mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Riesch <michael.riesch@wolfvision.net>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] pinctrl: rockchip: use alias rather than full of name
Date: Wed, 17 Nov 2021 13:42:42 +0100	[thread overview]
Message-ID: <b73c12b9-8c4d-29cf-8b7d-60eba56f964b@wolfvision.net> (raw)
In-Reply-To: <20211115075453.GD25698@pengutronix.de>

Hello Sascha,

On 11/15/21 8:54 AM, Sascha Hauer wrote:
> On Thu, Nov 11, 2021 at 03:03:16PM +0100, Michael Riesch wrote:
>> Do not rely on GPIO controllers being named "gpioX". Instead, use the
>> alias to match the controllers to the GPIO banks.
>>
>> Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
>> ---
>>   drivers/pinctrl/pinctrl-rockchip.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
>> index 1fdb9a913..0e706c51d 100644
>> --- a/drivers/pinctrl/pinctrl-rockchip.c
>> +++ b/drivers/pinctrl/pinctrl-rockchip.c
>> @@ -888,7 +888,7 @@ static struct rockchip_pin_ctrl *rockchip_pinctrl_get_soc_data(
>>   		bank = ctrl->pin_banks;
>>   		for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
>>   			name = bank->name;
>> -			if (!strncmp(name, np->name, strlen(name))) {
>> +			if (!strncmp(name, of_alias_get(np), strlen(name))) {
> 
> Please use of_alias_get_id(np, "gpio");

OK! v2 in preparation.

Best regards,
Michael

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2021-11-17 12:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 14:03 [PATCH 0/3] arm: rockchip: minor fixes as preparation for mainline dts Michael Riesch
2021-11-11 14:03 ` [PATCH 1/3] arm: rockchip: rk3568: fix mmc boot source instances Michael Riesch
2021-11-15  7:51   ` Sascha Hauer
2021-11-15  8:06     ` Sascha Hauer
2021-11-15  9:24       ` Michael Riesch
2021-11-17 14:24         ` [RFC PATCH] bootsource: add helper to set instance by name Michael Riesch
2022-01-14  8:25           ` Michael Riesch
2022-01-14  9:15           ` Sascha Hauer
2021-11-11 14:03 ` [PATCH 2/3] net: designware: rockchip: remove unnecessary clock pclk_xpcs Michael Riesch
2022-01-14  5:24   ` Ahmad Fatoum
2022-01-14  8:16     ` Sascha Hauer
2021-11-11 14:03 ` [PATCH 3/3] pinctrl: rockchip: use alias rather than full of name Michael Riesch
2021-11-15  7:54   ` Sascha Hauer
2021-11-17 12:42     ` Michael Riesch [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=b73c12b9-8c4d-29cf-8b7d-60eba56f964b@wolfvision.net \
    --to=michael.riesch@wolfvision.net \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /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