From patchwork Fri Sep 7 05:38:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kim Kukjin X-Patchwork-Id: 1419631 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id A82C23FC85 for ; Fri, 7 Sep 2012 05:41:29 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9rHV-000169-E1; Fri, 07 Sep 2012 05:39:05 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9rHO-000150-Mq for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2012 05:39:00 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9Y00DBDSZGF0L0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2012 14:38:53 +0900 (KST) X-AuditID: cbfee61b-b7f586d000007adc-6d-5049886d147d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AA.D0.31452.D6889405; Fri, 07 Sep 2012 14:38:53 +0900 (KST) Received: from DOKGENEKIM03 ([12.23.119.152]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M9Y00CCLT0SCEF0@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2012 14:38:53 +0900 (KST) From: Kukjin Kim To: =?UTF-8?Q?'Heiko_St=C3=BCbner'?= , 'Grant Likely' , 'Rob Herring' , 'Rob Landley' , 'Linus Walleij' , 'Olof Johansson' , 'Thomas Abraham' , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 'linux-samsung-soc' References: <201208282355.44268.heiko@sntech.de> In-reply-to: <201208282355.44268.heiko@sntech.de> Subject: RE: [PATCH v2] gpio: samsung: add devicetree init for s3c24xx arches Date: Fri, 07 Sep 2012 14:38:52 +0900 Message-id: <243901cd8cbb$10ad0580$32071080$%kim@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac2FZ+aQkGiCZe+dTuWUlVoSt22nlQHUh0bw Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrALMWRmVeSWpSXmKPExsVy+t9jQd3cDs8Ag3WrhC02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfG87crGQumClWs2zybrYHxLl8XIyeHhICJxOaWj6wQtpjEhXvr 2boYuTiEBKYzSuxd/p4JJCEksIxJ4s2PeBCbTUBD4vD7Z+wgRSICd5gl2rdthCoykLj/7g5Q goODU8BQYsqjIpCwsICvxMW/v9hAbBYBVYkHE3+ClfMK2EpM7FjLAmELSvyYfA/MZhZQl5g0 bxEzhK0t8eTdBVaQkRJA8Ud/dUHCIgJGEqf3t7FClIhI7HvxjnECo+AsJJNmIZk0C8mkWUha FjCyrGIUTS1ILihOSs810itOzC0uzUvXS87P3cQIDtdn0jsYVzVYHGIU4GBU4uG1uOIRIMSa WFZcmXuIUYKDWUmEd+IvoBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFep3N2AUIC6YklqdmpqQWp RTBZJg5OqQZG/sinnr7Gru+447MCv0SIVqU6PljSeufWO37d+6WWlq27d3HN0NO7LOnGed8u zae6a99uGzXnlUZtU7se357SvP5pvnDcqxXMLeX5u313OlcefvhqifW8ebtf+q8JUFueXFF1 pGnVuRtfHveqSvqc6NO/faFCxXY6q751eO6JSMtXS17qZLxUYinOSDTUYi4qTgQANlgxlVMC AAA= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 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.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Heiko Stübner wrote: > > Until now the Exynos-SoC was the only Samsung-SoC supporting the GPIOs > via the device tree. This patch implements dt-support for the > s3c24xx arches. > > The controllers contain only 3 cells, as the underlying gpio controller > does not support controlling the drive strength on a gpio level. > > Tested with the gpio-keys driver on a s3c2416 based machine. > > Signed-off-by: Heiko Stuebner > Reviewed-by: Thomas Abraham > --- [...] > +#if defined(CONFIG_PLAT_S3C24XX) && defined(CONFIG_OF) [...] > +static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip > *chip, > + u64 base, u64 offset) > +{ [...] > +} > +#elif defined(CONFIG_PLAT_S3C24XX) Heiko, above line breaks building for other samsung stuff except s3c24xx. I fixed with following which has been amended in your patch. If any problems, please let me know. Thanks. Best regards, Kgene. --- Kukjin Kim , Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. > +static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip > *chip, > + u64 base, u64 offset) > +{ > + return; > +} > +#endif /* defined(CONFIG_PLAT_S3C24XX) && defined(CONFIG_OF) */ > + > static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip > *chip, > int nr_chips, void __iomem *base) > { > @@ -962,6 +1023,8 @@ static void __init s3c24xx_gpiolib_add_chips(struct > samsung_gpio_chip *chip, > gc->direction_output = samsung_gpiolib_2bit_output; > > samsung_gpiolib_add(chip); > + > + s3c24xx_gpiolib_attach_ofnode(chip, S3C24XX_PA_GPIO, i * > 0x10); > } > } > > -- > 1.7.2.3 diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index 5dcdcda..a006f0d 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -991,7 +991,7 @@ static __init void s3c24xx_gpiolib_attach_ofnode(struct samsun gc->of_gpio_n_cells = 3; gc->of_xlate = s3c24xx_gpio_xlate; } -#elif defined(CONFIG_PLAT_S3C24XX) +#else static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip *chip, u64 base, u64 offset) {