From: "jay.xu@rock-chips.com" <jay.xu@rock-chips.com>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Cc: "Johan Jonker" <jbx6244@gmail.com>,
"Heiko Stübner" <heiko@sntech.de>,
"linus.walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
linux-gpio <linux-gpio@vger.kernel.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>
Subject: Re: Re: [PATCH] pinctrl: rockchip: find gpiochip by name from gpio module
Date: Tue, 20 Sep 2022 09:23:59 +0800 [thread overview]
Message-ID: <2022092009235942164711@rock-chips.com> (raw)
In-Reply-To: YyRPy8MnklttTup8@smile.fi.intel.com
Hi Andy and Walleij
--------------
jay.xu@rock-chips.com
>On Fri, Sep 16, 2022 at 04:43:43PM +0800, Jianqun Xu wrote:
>> Currently the pinctrl device acts as parent for the gpio devices for
>> rockchip platform, the pinctrl driver probes first and then populate the
>> gpio platform lastly.
>>
>> This patch makes the pinctrl to populate gpio platform firstly and then
>> do probe after gpio probed successfully. And get gpiochips througth a
>> find function by the gpio label.
>
>> +static int gpiochip_match_name(struct gpio_chip *gc, void *data)
>> +{
>> + const char *name = data;
>> +
>> + return !strcmp(gc->label, name);
>> +}
>
>> + gc = gpiochip_find((void *)ctrl->pin_banks[i].name, gpiochip_match_name);
>> + if (!gc) {
>> + dev_err(dev, "fail to find gpiochip\n");
>> + return ret;
>> + }
>
>NIH find_chip_by_name()
>
I send a patch "[PATCH RESEND] gpiolib: make gpiochip_find_by_name to be common function"
please help to review before this patch, thanks
>
>--
>With Best Regards,
>Andy Shevchenko
>
>
>
>--
>With Best Regards,
>Andy Shevchenko
>
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2022-09-20 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 8:43 [PATCH] pinctrl: rockchip: find gpiochip by name from gpio module Jianqun Xu
2022-09-16 14:43 ` kernel test robot
2022-09-17 5:06 ` kernel test robot
2022-09-19 13:53 ` Andy Shevchenko
2022-09-20 1:23 ` jay.xu [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=2022092009235942164711@rock-chips.com \
--to=jay.xu@rock-chips.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=heiko@sntech.de \
--cc=jbx6244@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/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