Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: krzk@kernel.org (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] pinctrl: samsung: Register pinctrl before GPIO
Date: Thu, 23 Mar 2017 20:51:43 +0200	[thread overview]
Message-ID: <20170323185143.7nfgddujuie6ccws@kozik-lap> (raw)
In-Reply-To: <1490202935-4708-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>

On Wed, Mar 22, 2017 at 05:15:34PM +0000, Charles Keepax wrote:
> If we request a GPIO hog, then gpiochip_add_data will attempt
> to request some of its own GPIOs. The driver also uses
> gpiochip_generic_request which means that for any GPIO request to
> succeed the pinctrl needs to be registered. Currently however the
> driver registers the GPIO and then the pinctrl meaning all GPIO hog
> requests will fail, which then in turn causes the whole driver to fail
> probe.
> 
> Fix this up by ensuring we register the pinctrl first. This
> does require us to manually set the GPIO base for the
> pinctrl. Fortunately the driver already assigns a fixed GPIO base, in
> samsung_gpiolib_register, and uses the same calculation it does for
> the pin_base. Meaning the two will always be the same and allowing us
> to reuse the pinbase and avoid the issue.
> 
> Although currently there are no users of GPIO hogs in mainline
> there are plenty of Samsung based boards that are widely used for
> development purposes of other hardware. Indeed we hit this issue
> whilst attaching some additional hardware to an Arndale system.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> 
> Changes since v2:
>  - Squash in fix to set the GPIO base on the pin_bank.
> 
>  drivers/pinctrl/samsung/pinctrl-samsung.c | 36 +++++++++++++++----------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 

Thanks, applied.

Best regards,
Krzysztof

      parent reply	other threads:[~2017-03-23 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 17:15 [PATCH v3 1/2] pinctrl: samsung: Register pinctrl before GPIO Charles Keepax
2017-03-22 17:15 ` [PATCH v3 2/2] pinctrl: samsung: Use devres version of gpiochip_add_data Charles Keepax
2017-03-23 18:51   ` Krzysztof Kozlowski
2017-03-23 18:51 ` Krzysztof Kozlowski [this message]

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=20170323185143.7nfgddujuie6ccws@kozik-lap \
    --to=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox