From patchwork Mon May 8 08:59:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 759572 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wLxK66G0kz9s7f for ; Mon, 8 May 2017 18:59:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jRouKyA7"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yZuiHGs/rDeuRNhKMuwQKL5y3jukjeaLHEQU7FdfE0Q=; b=jRouKyA7FxGWyu h07Rs1NZxyoxJzu2w2mt8YAcy+SnL4wVGAMlJLooiy8bGV9e0IbWeluxg22Wa4VM3xcB5/oplHQPs ojZqaRA6XPEcy9J6sV9kHI3CWPw1TLTABdbHa5oOKLEkwgMosLwhxSai12tL1Z9sDKO7cbFJ2hRPg kLSZ+S+wLUsAk1nhyh0wqHWPo50rrrqmErYYW3JEs/vgvUOcre7cvD6C25L8PATDEC6zT8f1U+2vS xIcbzATFqqOYs46b3oTT1Eb6JG3tRJXc6hj2ygb5d2J9FfLJwYhy+R19F+S6vXlpfkJzwUsc/fYXZ ys1Np0ALN+O6Td2anNiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d7eWG-0004Yl-FL; Mon, 08 May 2017 08:59:52 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d7eWD-0004VI-Vr for linux-arm-kernel@lists.infradead.org; Mon, 08 May 2017 08:59:51 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d7eVr-0004pa-RI; Mon, 08 May 2017 10:59:27 +0200 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1d7eVq-0004oL-KA; Mon, 08 May 2017 10:59:26 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Shawn Guo , Linus Walleij Subject: [PATCH] ARM: dts: imx28: add gpio-ranges for internal gpio controller Date: Mon, 8 May 2017 10:59:25 +0200 Message-Id: <20170508085925.18342-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170508_015950_193919_3301BB37 X-CRM114-Status: GOOD ( 10.84 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , linux-gpio@vger.kernel.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Signed-off-by: Uwe Kleine-König --- Hello, with this patch applied I get the following lines in dmesg which looks fine: [ 0.227913] gpio gpiochip0: (80018000.pinctrl:gpio@0): created GPIO range 0->31 ==> 80018000.pinctrl PIN 0->31 [ 0.236100] gpio gpiochip1: (80018000.pinctrl:gpio@1): created GPIO range 0->31 ==> 80018000.pinctrl PIN 32->63 [ 0.244463] gpio gpiochip2: (80018000.pinctrl:gpio@2): created GPIO range 0->31 ==> 80018000.pinctrl PIN 64->95 [ 0.253020] gpio gpiochip3: (80018000.pinctrl:gpio@3): created GPIO range 0->31 ==> 80018000.pinctrl PIN 96->127 [ 0.261639] gpio gpiochip4: (80018000.pinctrl:gpio@4): created GPIO range 0->31 ==> 80018000.pinctrl PIN 128->159 But when looking at a used gpio # cat /sys/kernel/debug/gpio gpiochip0: GPIOs 0-31, parent: platform/80018000.pinctrl:gpio@0, 80018000.pinctrl:gpio@0: ... gpio-20 (LED4 |? ) out hi ... # grep "pin 20 " /sys/kernel/debug/pinctrl/80018000.pinctrl/pinmux-pins pin 20 (GPMI_RDY0): leds (GPIO UNCLAIMED) function leds group leds.0 I wonder why there is still "GPIO UNCLAIMED". I would have expected that this disappears and somehow references the gpio_request issued by the led-gpio driver after my patch. What am I missing? Best regards Uwe arch/arm/boot/dts/imx28.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index 148fcf4d3b98..cfad2295cc46 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -182,6 +182,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 0 0 32>; }; gpio1: gpio@1 { @@ -192,6 +193,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 0 32 32>; }; gpio2: gpio@2 { @@ -202,6 +204,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 0 64 32>; }; gpio3: gpio@3 { @@ -212,6 +215,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 0 96 32>; }; gpio4: gpio@4 { @@ -222,6 +226,7 @@ #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 0 128 32>; }; duart_pins_a: duart@0 {