From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753426AbcBXPAl (ORCPT ); Wed, 24 Feb 2016 10:00:41 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:56730 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751671AbcBXPAk (ORCPT ); Wed, 24 Feb 2016 10:00:40 -0500 From: Arnd Bergmann To: Philipp Zabel Cc: Lee Jones , Alexander Shiyan , Pankaj Dubey , Pawel Moll , Wolfram Sang , Peter Seiderer , Tushar Behera , linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH v2] mfd: syscon: allow to register syscon with a device Date: Wed, 24 Feb 2016 16:00:22 +0100 Message-ID: <2970085.kbMT7OBsMB@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1456317864.3396.41.camel@pengutronix.de> References: <1456312741-7658-1-git-send-email-p.zabel@pengutronix.de> <2470261.O5caHJeW3o@wuerfel> <1456317864.3396.41.camel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:VVuJ3nWoVtypPfLnSOmmgCiYPHGMz8XUj1xyerPf2s2w/7CkN4b +cHNK5ByaQOMjOyS7NRjbeHkTEu+mgoHcHkiGEb3WHCkrD7H1RZJcE+nb/FTFA17229BQ0L NhKxQ+X71Pspsa6lVx1RvWEB6ygoiHmOa+QKUIu5ljyyCJgsK2CAR91Tp1MCkJVQBvCDDI4 utZN8MWTBNuGT8y/JgTqQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:JNv8ASlU6Jg=:jw3aWfx4GwaRFKPX0eKQUA JJjt30Y3FZTwyf7hGmlBUnQxrreMzGEZCGW5L6vJNuy1m9VGDE8Vw6ZBjr/DgKWN988Ze+rvf yCh3tRpoN+AYsCDdi67zGtYERFB1SpnphcRePh/vJxiMqDK9zxX/X/1+2+4Sd+XCbAomeVj5I zsFwYli+1UGnYM7LNQQDXYaNxanhXkNTIONc2EWRblKffVvUZcDZHl9K17EL6Ncp/sJD/A9Dj M6rjWOROIW1RvejNzG8qnra5jmbeKYn89ZysLzWxCWvY+uGXuQcNRNvn7e/rYBct8NfUF1/86 HIj8V5RGytvoElG66AVtIcbHeOLZmi/pQZolJu5WTQ5xDDvavRe5DfzsDAUty1Lrva6VeENyy nXZpLtnyjzKWaXV7nSaSFP24ZEcRiJMFQfDRD6ramcT4Tiy4pChZYhMTOnjBbvwZu1aZ4Z4gs W9Ba02SbJeecJfa/0DXQG7nodvwIKpux7W+FSVanBlhLlBn3Qh5xGywvN9gjAHYDOWzlfIv/f 5BYuesrXUBzIv5YK3nRjY+W0o0oLmmNmfqJzLeEmm2YgbjW3kG6aiyW+123RUkU4MWuMIKbw1 I5iNjA92tex2GhalMDcC7MbVhI68yO484Obuk10MBXz6TQ747+s4EBBkGb1MqJkL3fw3QKhHi Xm4wd1mt5hfKsY31SKKB3Y8uVMaIR6TppWTPlVs4Wm5+otZMjipnxHRNzr/8b3UeNlYQVdTA+ NDf69R8zpXUSieNk Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 24 February 2016 13:44:24 Philipp Zabel wrote: > Am Mittwoch, den 24.02.2016, 13:18 +0100 schrieb Arnd Bergmann: > > On Wednesday 24 February 2016 12:19:01 Philipp Zabel wrote: > > > Commit bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform > > > devices") added the possibility to register syscon devices without > > > associated platform device. This also removed regmap debugfs facilities, > > > which don't work without a device. Since there is no replacement, this > > > patch allows again to register syscon regions with an associated device > > > where that this device exists anyway. > > > > > > Signed-off-by: Philipp Zabel > > > > Can you elaborate how you want to use the new interface? > > I use this patch to attach the regmap to the IOMUXC device, which the > GPR (syscon) region on i.MX6 is a part of: > > diff --git a/drivers/pinctrl/freescale/pinctrl-imx6q.c b/drivers/pinctrl/freescale/pinctrl-imx6q.c > index 4d1fcb8..74a68ec 100644 > --- a/drivers/pinctrl/freescale/pinctrl-imx6q.c > +++ b/drivers/pinctrl/freescale/pinctrl-imx6q.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -473,6 +474,12 @@ static const struct of_device_id imx6q_pinctrl_of_match[] = { > > static int imx6q_pinctrl_probe(struct platform_device *pdev) > { > + struct device_node *syscon_np; > + > + syscon_np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-iomuxc-gpr"); > + if (syscon_np) > + syscon_register(&pdev->dev, syscon_np); > + > return imx_pinctrl_probe(pdev, &imx6q_pinctrl_info); > } > > The pinctrl driver is probed at arch_initcall time. I still don't see it where you are getting with this. Is this just for the debugfs interface or is there something else this does on top of that? Arnd