All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
	"Andrzej Hajda" <a.hajda@samsung.com>,
	"Lv Zheng" <lv.zheng@intel.com>,
	"Alexander Holler" <holler@ahsoftware.de>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Robert Moore" <robert.moore@intel.com>,
	"Grant Likely" <grant.likely@linaro.org>,
	"Len Brown" <lenb@kernel.org>, "Pawel Moll" <pawel.moll@arm.com>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Terje Bergström" <tbergstrom@nvidia.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Kumar Gala" <galak@codeaurora.org>
Subject: Re: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed
Date: Wed, 15 Jul 2015 10:13:40 +0200	[thread overview]
Message-ID: <CAAObsKC15XrBhDLb08_dBxPhcX+4i9YxqT963c0LDvziZVQhZA@mail.gmail.com> (raw)
In-Reply-To: <CAAVeFu+L+Qrja4gWEA=FnnbtBFkX43zpmJLJq0PSWLx5m4w6kA@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: tomeu.vizoso@collabora.com (Tomeu Vizoso)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed
Date: Wed, 15 Jul 2015 10:13:40 +0200	[thread overview]
Message-ID: <CAAObsKC15XrBhDLb08_dBxPhcX+4i9YxqT963c0LDvziZVQhZA@mail.gmail.com> (raw)
In-Reply-To: <CAAVeFu+L+Qrja4gWEA=FnnbtBFkX43zpmJLJq0PSWLx5m4w6kA@mail.gmail.com>

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 at 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

  reply	other threads:[~2015-07-15  8:14 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 13:42 [PATCH 00/13] Discover and probe dependencies Tomeu Vizoso
2015-06-17 13:42 ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 01/13] gpiolib: Fix docs for gpiochip_add_pingroup_range Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-07-13 12:16   ` Linus Walleij
2015-07-13 12:16     ` Linus Walleij
2015-06-17 13:42 ` [PATCH 02/13] driver-core: defer all probes until late_initcall Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-18 21:50   ` Rafael J. Wysocki
2015-06-18 21:50     ` Rafael J. Wysocki
2015-06-19 13:36     ` Tomeu Vizoso
2015-06-19 13:36       ` Tomeu Vizoso
2015-06-19 23:20       ` Rafael J. Wysocki
2015-06-19 23:20         ` Rafael J. Wysocki
2015-06-23  0:07         ` Rob Herring
2015-06-23  0:07           ` Rob Herring
2015-06-23 14:37           ` Rafael J. Wysocki
2015-06-23 14:37             ` Rafael J. Wysocki
2015-06-23 14:17             ` Tomeu Vizoso
2015-06-23 14:17               ` Tomeu Vizoso
2015-06-23 14:51               ` Rafael J. Wysocki
2015-06-23 14:51                 ` Rafael J. Wysocki
2015-06-23 14:37                 ` Tomeu Vizoso
2015-06-23 14:37                   ` Tomeu Vizoso
2015-06-24  0:14                   ` Rafael J. Wysocki
2015-06-24  0:14                     ` Rafael J. Wysocki
2015-06-17 13:42 ` [PATCH 03/13] ARM: tegra: Add gpio-ranges property Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 17:25   ` Mark Brown
2015-06-17 17:25     ` Mark Brown
2015-06-18  8:06     ` Tomeu Vizoso
2015-06-18  8:06       ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 04/13] pinctrl: tegra: Only set the gpio range if needed Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-07-13 20:14   ` Linus Walleij
2015-07-13 20:14     ` Linus Walleij
2015-07-14  8:34     ` Tomeu Vizoso
2015-07-14  8:34       ` Tomeu Vizoso
2015-07-15  3:17       ` Alexandre Courbot
2015-07-15  3:17         ` Alexandre Courbot
2015-07-15  8:13         ` Tomeu Vizoso [this message]
2015-07-15  8:13           ` Tomeu Vizoso
2015-07-17  8:04       ` Linus Walleij
2015-07-17  8:04         ` Linus Walleij
2015-07-17  8:19         ` Tomeu Vizoso
2015-07-17  8:19           ` Tomeu Vizoso
2015-07-17  9:36           ` Linus Walleij
2015-07-17  9:36             ` Linus Walleij
2015-06-17 13:42 ` [PATCH 05/13] driver core: fix docbook for device_private.device Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 06/13] of/platform: Set fwnode field for new devices Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 17:27   ` Mark Brown
2015-06-17 17:27     ` Mark Brown
2015-06-17 13:42 ` [PATCH 07/13] driver-core: Add class.get_dependencies() callback Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 08/13] gpio: sysfs: implement class.get_dependencies() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 17:40   ` Mark Brown
2015-06-17 17:40     ` Mark Brown
2015-06-30 15:00     ` Tomeu Vizoso
2015-06-30 15:00       ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 09/13] gpu: host1x: " Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 10/13] driver-core: add for_each_class() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 11/13] device property: add fwnode_get_parent() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 12/13] device property: add fwnode_get_name() Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 13:42 ` [PATCH 13/13] driver-core: probe dependencies before probing Tomeu Vizoso
2015-06-17 13:42   ` Tomeu Vizoso
2015-06-17 18:13   ` Mark Brown
2015-06-17 18:13     ` Mark Brown
2015-06-30 15:18     ` Tomeu Vizoso
2015-06-30 15:18       ` Tomeu Vizoso
2015-06-18  9:42 ` [PATCH 00/13] Discover and probe dependencies Andrzej Hajda
2015-06-18  9:42   ` Andrzej Hajda
2015-06-18  9:57   ` Russell King - ARM Linux
2015-06-18  9:57     ` Russell King - ARM Linux
2015-06-18 10:36   ` Mark Brown
2015-06-18 10:36     ` Mark Brown
2015-06-18 13:14     ` Andrzej Hajda
2015-06-18 13:14       ` Andrzej Hajda
2015-06-18 14:38       ` Tomeu Vizoso
2015-06-18 14:38         ` Tomeu Vizoso
2015-06-18 14:49       ` Russell King - ARM Linux
2015-06-18 14:49         ` Russell King - ARM Linux
2015-06-18 15:32         ` Alexander Holler
2015-06-18 15:32           ` Alexander Holler
2015-06-18 14:57   ` Tomeu Vizoso
2015-06-18 14:57     ` Tomeu Vizoso

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=CAAObsKC15XrBhDLb08_dBxPhcX+4i9YxqT963c0LDvziZVQhZA@mail.gmail.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=a.hajda@samsung.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=holler@ahsoftware.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=k.kozlowski@samsung.com \
    --cc=lenb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=lv.zheng@intel.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tbergstrom@nvidia.com \
    --cc=thierry.reding@gmail.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.