[PATCH 3/3] pinctrl: rockchip: use alias rather than full of name
Michael Riesch
michael.riesch at wolfvision.net
Wed Nov 17 04:42:42 PST 2021
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 at 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
More information about the barebox
mailing list