linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sam Protsenko <semen.protsenko@linaro.org>,
	Mateusz Majewski <m.majewski2@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, Tomasz Figa <tomasz.figa@gmail.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 0/4] Fix Samsung pinctrl driver static allocation of GPIO base warning
Date: Sun, 8 Oct 2023 15:09:29 +0200	[thread overview]
Message-ID: <04260159-f5a8-47f7-b267-33f4ea19b8a6@linaro.org> (raw)
In-Reply-To: <CAPLW+4kmA6iYDPFxyASHLJifz63DRxT9gqQ-AsMAVy0RzoaFRw@mail.gmail.com>

On 07/10/2023 04:14, Sam Protsenko wrote:
> On Fri, Oct 6, 2023 at 8:01 AM Mateusz Majewski <m.majewski2@samsung.com> wrote:
>>
>> The object of this work is fixing the following warning, which appears
>> on all targets using that driver:
>>
>> gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
>>
>> This needs a small refactor to how we interact with the pinctrl
>> subsystem. Finally, we remove some bookkeeping that has only been
>> necessary to allocate GPIO bases correctly.
>>
>> Mateusz Majewski (4):
>>   pinctrl: samsung: defer pinctrl_enable
>>   pinctrl: samsung: use add_pin_ranges method to add pinctrl ranges
>>   pinctrl: samsung: choose GPIO numberspace base dynamically
>>   pinctrl: samsung: do not offset pinctrl numberspaces
>>
>>  drivers/pinctrl/samsung/pinctrl-samsung.c | 56 ++++++++++++-----------
>>  drivers/pinctrl/samsung/pinctrl-samsung.h |  4 +-
>>  2 files changed, 31 insertions(+), 29 deletions(-)
>>
>> --
> 
> Hi Mateusz,
> 
> Thank you for handling this! Those deprecation warnings have been
> bugging me for some time :) While testing this series on my E850-96
> board (Exynos850 based), I noticed some changes in
> /sys/kernel/debug/gpio file, like these:
> 
> 8<------------------------------------------------------------------------------------------>8
> -gpiochip0: GPIOs 0-7, parent: platform/11850000.pinctrl, gpa0:
> - gpio-7   (                    |Volume Up           ) in  hi IRQ ACTIVE LOW
> +gpiochip0: GPIOs 512-519, parent: platform/11850000.pinctrl, gpa0:
> + gpio-519 (                    |Volume Up           ) in  hi IRQ ACTIVE LOW
> 
> -gpiochip1: GPIOs 8-15, parent: platform/11850000.pinctrl, gpa1:
> - gpio-8   (                    |Volume Down         ) in  hi IRQ ACTIVE LOW
> +gpiochip1: GPIOs 520-527, parent: platform/11850000.pinctrl, gpa1:
> + gpio-520 (                    |Volume Down         ) in  hi IRQ ACTIVE LOW
> 
> -gpiochip2: GPIOs 16-23, parent: platform/11850000.pinctrl, gpa2:
> +gpiochip2: GPIOs 528-535, parent: platform/11850000.pinctrl, gpa2:
> 
> ...
> 8<------------------------------------------------------------------------------------------>8
> 
> So basically it looks like all line numbers were offset by 512. Can
> you please comment on this? Is it an intentional change, and why it's
> happening?
> 
> Despite of that change, everything seems to be working fine. But I
> kinda liked the numeration starting from 0 better :)

Could it be the reason of dynamic allocation?


Best regards,
Krzysztof


  reply	other threads:[~2023-10-08 13:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20231006130032eucas1p18c6f5c39614768911730fa6ed0201ee3@eucas1p1.samsung.com>
2023-10-06 12:55 ` [PATCH 0/4] Fix Samsung pinctrl driver static allocation of GPIO base warning Mateusz Majewski
     [not found]   ` <CGME20231006130038eucas1p1c849a21714227a11759681ef909ffd94@eucas1p1.samsung.com>
2023-10-06 12:55     ` [PATCH 1/4] pinctrl: samsung: defer pinctrl_enable Mateusz Majewski
2023-10-07  2:14       ` Sam Protsenko
     [not found]   ` <CGME20231006130041eucas1p1fd945c734c0d35067107e7c699201bdb@eucas1p1.samsung.com>
2023-10-06 12:55     ` [PATCH 2/4] pinctrl: samsung: use add_pin_ranges method to add pinctrl ranges Mateusz Majewski
     [not found]   ` <CGME20231006130042eucas1p10679037ebd812183a5edff0b7c1e8b6a@eucas1p1.samsung.com>
2023-10-06 12:55     ` [PATCH 3/4] pinctrl: samsung: choose GPIO numberspace base dynamically Mateusz Majewski
     [not found]   ` <CGME20231006130044eucas1p17a141ec5aafca3d5af5295049f8b1651@eucas1p1.samsung.com>
2023-10-06 12:55     ` [PATCH 4/4] pinctrl: samsung: do not offset pinctrl numberspaces Mateusz Majewski
2023-10-07  2:14   ` [PATCH 0/4] Fix Samsung pinctrl driver static allocation of GPIO base warning Sam Protsenko
2023-10-08 13:09     ` Krzysztof Kozlowski [this message]
2023-10-08 18:45       ` Sam Protsenko
2023-10-09  9:42         ` Krzysztof Kozlowski
2023-10-09  9:52           ` Marek Szyprowski
2023-10-09 10:02   ` Marek Szyprowski
2023-10-09 10:38   ` Krzysztof Kozlowski
2023-10-10 12:09   ` Linus Walleij

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=04260159-f5a8-47f7-b267-33f4ea19b8a6@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.majewski2@samsung.com \
    --cc=m.szyprowski@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=semen.protsenko@linaro.org \
    --cc=tomasz.figa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).