From: Shawn Guo <shawnguo@kernel.org>
To: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: Sascha Hauer <kernel@pengutronix.de>,
Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org,
Philipp Zabel <p.zabel@pengutronix.de>,
Fabio Estevam <fabio.estevam@nxp.com>,
Deepak Das <deepak_das@mentor.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/3] gpio/pinctrl: imx: let IOMUX controller know about on-SoC GPIOs
Date: Thu, 8 Sep 2016 09:41:07 +0800 [thread overview]
Message-ID: <20160908014107.GA2533@x250> (raw)
In-Reply-To: <1c1d23a0-9656-2682-e573-13385a002998@mentor.com>
On Mon, Sep 05, 2016 at 02:49:16PM +0300, Vladimir Zapolskiy wrote:
> >If I understand it correctly, with the change, most of GPIO client
> >device drivers use the same init level as GPIO driver. So we are not
> >sure if GPIO driver is ready when client drivers try to request GPIO.
>
> please give it a test run (with and without DTS gpio-ranges changes,
> or just 2/3 from the series), I've tested on iMX6Q SabreLite, SabreAuto,
> SabreSD and I don't see any regressions or noticeable increase of
> -EPROBE_DEFER hits due to not ready GPIOs.
>
> >most of GPIO client device drivers use the same init level as GPIO driver.
>
> IMHO that will be the case, if the change 2/3 from the series is applied.
>
> Statisticaly most of GPIO consumers should settle on device_initcall or
> module_init level, the latter one is translated to device_initcall if
> a driver is built-in, so the proposed downgrading of GPIO controller
> driver init call level looks to be appropriate.
>
> However pinctrl/pinmux driver should definitely have higher init level
> priority in comparison to GPIO controller driver, every GPIO consumer
> is a pinctrl/pinmux consumer as well, most of iMX pinctrl/pinmux drivers
> are initialized at arch_initcall level, so there is a plenty of options
> to satisfy (GPIO driver initcall) < (pinmux/pinctrl driver initcall)
> equation:
> * change pinmux/pinctrl driver initcall level to postcore_initcall
> and GPIO driver initcall level to arch_initcall or lower one,
> * keep pinmux/pinctrl driver at arch_initcall level, set GPIO driver
> initcall level to any lower than arch_initcall (e.g. device_initcall)
> * keep everything as is, drop 2/3 and rely on -EPROBE_DEFER from
> GPIO driver probe due to not yet initialized pinctrl driver.
>
> >It shouldn't be a problem if every client driver handle the failure
> >with deferred probing, but I'm not sure that's the case now.
> >
>
> From what I see it is the case for the most critical drivers, for the
> rest I believe it is a bug, which can be revealed by shifting GPIO
> driver initcall level and fixed, see also
>
> https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2016-August/003419.html
Okay, fair enough.
For the series,
Acked-by: Shawn Guo <shawnguo@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] gpio/pinctrl: imx: let IOMUX controller know about on-SoC GPIOs
Date: Thu, 8 Sep 2016 09:41:07 +0800 [thread overview]
Message-ID: <20160908014107.GA2533@x250> (raw)
In-Reply-To: <1c1d23a0-9656-2682-e573-13385a002998@mentor.com>
On Mon, Sep 05, 2016 at 02:49:16PM +0300, Vladimir Zapolskiy wrote:
> >If I understand it correctly, with the change, most of GPIO client
> >device drivers use the same init level as GPIO driver. So we are not
> >sure if GPIO driver is ready when client drivers try to request GPIO.
>
> please give it a test run (with and without DTS gpio-ranges changes,
> or just 2/3 from the series), I've tested on iMX6Q SabreLite, SabreAuto,
> SabreSD and I don't see any regressions or noticeable increase of
> -EPROBE_DEFER hits due to not ready GPIOs.
>
> >most of GPIO client device drivers use the same init level as GPIO driver.
>
> IMHO that will be the case, if the change 2/3 from the series is applied.
>
> Statisticaly most of GPIO consumers should settle on device_initcall or
> module_init level, the latter one is translated to device_initcall if
> a driver is built-in, so the proposed downgrading of GPIO controller
> driver init call level looks to be appropriate.
>
> However pinctrl/pinmux driver should definitely have higher init level
> priority in comparison to GPIO controller driver, every GPIO consumer
> is a pinctrl/pinmux consumer as well, most of iMX pinctrl/pinmux drivers
> are initialized at arch_initcall level, so there is a plenty of options
> to satisfy (GPIO driver initcall) < (pinmux/pinctrl driver initcall)
> equation:
> * change pinmux/pinctrl driver initcall level to postcore_initcall
> and GPIO driver initcall level to arch_initcall or lower one,
> * keep pinmux/pinctrl driver at arch_initcall level, set GPIO driver
> initcall level to any lower than arch_initcall (e.g. device_initcall)
> * keep everything as is, drop 2/3 and rely on -EPROBE_DEFER from
> GPIO driver probe due to not yet initialized pinctrl driver.
>
> >It shouldn't be a problem if every client driver handle the failure
> >with deferred probing, but I'm not sure that's the case now.
> >
>
> From what I see it is the case for the most critical drivers, for the
> rest I believe it is a bug, which can be revealed by shifting GPIO
> driver initcall level and fixed, see also
>
> https://lists.linuxfoundation.org/pipermail/ksummit-discuss/2016-August/003419.html
Okay, fair enough.
For the series,
Acked-by: Shawn Guo <shawnguo@kernel.org>
next prev parent reply other threads:[~2016-09-08 1:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 22:10 [PATCH 0/3] gpio/pinctrl: imx: let IOMUX controller know about on-SoC GPIOs Vladimir Zapolskiy
2016-08-19 22:10 ` Vladimir Zapolskiy
2016-08-19 22:10 ` [PATCH 1/3] pinctrl: imx: accept gpio request/free from pinctrl Vladimir Zapolskiy
2016-08-19 22:10 ` Vladimir Zapolskiy
2016-08-19 22:10 ` [PATCH 2/3] gpio: mxc: lower level of gpio_mxc_init() initcall Vladimir Zapolskiy
2016-08-19 22:10 ` Vladimir Zapolskiy
2016-08-19 22:10 ` [PATCH 3/3] gpio: mxc: add generic gpio request/free callbacks to pinctrl Vladimir Zapolskiy
2016-08-19 22:10 ` Vladimir Zapolskiy
2016-09-02 13:11 ` [PATCH 0/3] gpio/pinctrl: imx: let IOMUX controller know about on-SoC GPIOs Vladimir Zapolskiy
2016-09-02 13:11 ` Vladimir Zapolskiy
2016-09-05 2:12 ` Shawn Guo
2016-09-05 2:12 ` Shawn Guo
2016-09-05 11:49 ` Vladimir Zapolskiy
2016-09-05 11:49 ` Vladimir Zapolskiy
2016-09-08 1:41 ` Shawn Guo [this message]
2016-09-08 1:41 ` Shawn Guo
2016-09-08 1:52 ` Vladimir Zapolskiy
2016-09-08 1:52 ` Vladimir Zapolskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160908014107.GA2533@x250 \
--to=shawnguo@kernel.org \
--cc=deepak_das@mentor.com \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=vladimir_zapolskiy@mentor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.