Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1184414

Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed

From Tomeu Vizoso <tomeu.vizoso@collabora.com>
Newsgroups linux.kernel
Subject Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed
Date 2015-07-15 10:20 +0200
Message-ID <pMq55-1Kj-33@gated-at.bofh.it> (permalink)
References <pClT3-2YK-5@gated-at.bofh.it> <pClT5-2YK-41@gated-at.bofh.it> <pLSmK-1jC-25@gated-at.bofh.it> <pM3US-8kr-23@gated-at.bofh.it> <pMloJ-3tA-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 15 July 2015 at 05:17, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Tue, Jul 14, 2015 at 5:34 PM, Tomeu Vizoso
> <tomeu.vizoso@collabora.com> wrote:
>> On 13 July 2015 at 22:14, Linus Walleij <linus.walleij@linaro.org> wrote:
>>> On Wed, Jun 17, 2015 at 3:42 PM, Tomeu Vizoso
>>> <tomeu.vizoso@collabora.com> wrote:
>>>
>>>> If the gpio DT node has the gpio-ranges property, the range will be
>>>> added by the gpio core and doesn't need to be added by the pinctrl
>>>> driver.
>>>>
>>>> By having the gpio-ranges property, we have an explicit dependency from
>>>> the gpio node to the pinctrl node and we can stop using the deprecated
>>>> pinctrl_add_gpio_range() function.
>>>>
>>>> Note that when the GPIO device gets probed before the associated
>>>> princtrl device, the gpio core actually won't register the gpio range.
>>>> Thus, this patch is only safe to be merged after we have in place a way
>>>> to assure that gpio devices are probed after their associated pinctrl
>>>> devices (such as ordered probing).
>>>>
>>>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>>>
>>> This doesn't look like it would hurt, but need Stephen's opinion
>>> on it, and I think he's on vacation. Would check with next-in-line
>>> Tegra maintainer, Thierry/Alexandre?
>>
>> Sorry about that, but I have split these changes out into their own
>> series after people complained about it.
>>
>> Have just sent a new version which already has Stephen's ack:
>>
>> https://lkml.kernel.org/g/1436862596-27730-1-git-send-email-tomeu.vizoso@collabora.com
>
> The change looks ok, but why limit it to Tegra? It seems like it could
> apply to any driver that supports gpio-range. Or is it because this
> will only work with drivers that use ordered probing?

It has to be SoC specific because we need to find out if a node
representing the in-SoC gpio controller is present, and has the
gpio-ranges property.

I guess we could move the code to the pinctrl core and parametrize the
property name but given that pinctrl_add_gpio_range is deprecated and
that we are doing this only for DT compatibility, I'm not sure it
would be a good idea.

Regards,

Tomeu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-07-14 10:40 +0200
  Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Alexandre Courbot <gnurou@gmail.com> - 2015-07-15 05:20 +0200
    Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-07-15 10:20 +0200
  Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Linus Walleij <linus.walleij@linaro.org> - 2015-07-17 10:10 +0200
    Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-07-17 10:20 +0200
      Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Linus Walleij <linus.walleij@linaro.org> - 2015-07-17 11:40 +0200

csiph-web