From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jianqun Xu <jay.xu@rock-chips.com>
Cc: jbx6244@gmail.com, heiko@sntech.de, linus.walleij@linaro.org,
brgl@bgdev.pl, linux-gpio@vger.kernel.org,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] pinctrl: rockchip: find gpiochip by name from gpio module
Date: Mon, 19 Sep 2022 16:53:11 +0300 [thread overview]
Message-ID: <YyRPy8MnklttTup8@smile.fi.intel.com> (raw)
In-Reply-To: <20220916084343.458566-1-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()
--
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
next prev parent reply other threads:[~2022-09-19 13:53 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 [this message]
2022-09-20 1:23 ` jay.xu
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=YyRPy8MnklttTup8@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=heiko@sntech.de \
--cc=jay.xu@rock-chips.com \
--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