From patchwork Fri Sep 21 14:22:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1491771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id CD7ECDF28C for ; Fri, 21 Sep 2012 14:27:06 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TF4AB-0002dS-A5; Fri, 21 Sep 2012 14:25:03 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TF49C-0002Gp-Bn for linux-arm-kernel@lists.infradead.org; Fri, 21 Sep 2012 14:24:04 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAP006QLEMV2O50@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 21 Sep 2012 23:23:26 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-f0-505c785e57fd Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 7E.CB.03860.E587C505; Fri, 21 Sep 2012 23:23:26 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAP0020KEMM3N30@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 21 Sep 2012 23:23:26 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/6] pinctrl: samsung: Hold OF node of pin bank in bank struct Date: Fri, 21 Sep 2012 16:22:52 +0200 Message-id: <1348237377-21299-2-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1348237377-21299-1-git-send-email-t.figa@samsung.com> References: <1348237377-21299-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIJMWRmVeSWpSXmKPExsVy+t9jAd24ipgAg00bxC02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfGv09n2Aq2clfMeXeGrYFxO2cXIyeHhICJxLWHV9khbDGJC/fW s3UxcnEICSxilLj/ey87hLOZSeJm33k2kCo2ATWJzw2PwGwRAQ2JKV2PwbqZBSYzSRxbkA5i CwuESDT1fWEEsVkEVCXuv/kGZHNw8Ao4SSw+WAixTF7i6f0+sDGcAs4SN3d1gI0RAir5vrCD eQIj7wJGhlWMoqkFyQXFSem5RnrFibnFpXnpesn5uZsYwR5/Jr2DcVWDxSFGAQ5GJR7eFd+i A4RYE8uKK3MPMUpwMCuJ8D6KAQrxpiRWVqUW5ccXleakFh9ilOZgURLnFf4UGCAkkJ5Ykpqd mlqQWgSTZeLglGpgVGz+ImO34+enNweVis6fFKmdNDHq4j+t1lpH8ZgTVn68859NjpU/dFND btPHrwuMYrZpf67hO1v7/cPLuPz9dwo2lJwI9t4nr2Rz79XHqWqB+rLX2VP5Zu5by2so++LR 9VYhhaINPDd35ktJeq/5Jyx4jNGCqcu7OENusb1e38s1Hq/mPd+rpcRSnJFoqMVcVJwIAKl9 Xpf0AQAA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.5 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] Cc: kgene.kim@samsung.com, swarren@wwwdotorg.org, devicetree-discuss@lists.ozlabs.org, tomasz.figa@gmail.com, t.figa@samsung.com, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org, linus.walleij@linaro.org, m.szyprowski@samsung.com 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The node pointer will be used in extensions added by patches that will follow. Signed-off-by: Tomasz Figa --- drivers/pinctrl/pinctrl-samsung.c | 2 ++ drivers/pinctrl/pinctrl-samsung.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 03bf743..846b277 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c @@ -825,6 +825,8 @@ static int samsung_pinctrl_parse_dt_bank(struct samsung_pin_bank *bank, if (!ret) bank->pudpdn_width = val; + bank->of_node = np; + if (!of_find_property(np, "interrupt-controller", NULL)) { bank->eint_type = EINT_TYPE_NONE; return 0; diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h index 72303f1..b7b74cc 100644 --- a/drivers/pinctrl/pinctrl-samsung.h +++ b/drivers/pinctrl/pinctrl-samsung.h @@ -111,6 +111,7 @@ struct samsung_pinctrl_drv_data; * @eint_type: type of the external interrupt supported by the bank. * @irq_base: starting controller local irq number of the bank. * @name: name to be prefixed for each pin in this pin bank. + * @of_node: node of pin bank in device tree */ struct samsung_pin_bank { u32 pctl_offset; @@ -125,6 +126,8 @@ struct samsung_pin_bank { u32 eint_offset; u32 irq_base; const char *name; + + struct device_node *of_node; }; /**