From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Patrice Chotard <patrice.chotard@foss.st.com>
Subject: Re: [PATCH v1 1/1] pinctrl: st: Switch to use fwnode instead of of_node
Date: Mon, 10 Oct 2022 10:59:25 -0700 [thread overview]
Message-ID: <Y0RdfcC5FVRX/XI9@google.com> (raw)
In-Reply-To: <20221010075615.43244-1-andriy.shevchenko@linux.intel.com>
On Mon, Oct 10, 2022 at 10:56:15AM +0300, Andy Shevchenko wrote:
> The OF node in the GPIO library is deprecated and soon
> will be removed.
>
> GPIO library now accepts fwnode as a firmware node, so
> switch the driver to use it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/pinctrl/pinctrl-st.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index cf7f9cbe6044..987878c83349 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1175,7 +1175,7 @@ static int st_pctl_dt_calculate_pin(struct st_pinctrl *info,
>
> for (i = 0; i < info->nbanks; i++) {
> chip = &info->banks[i].gpio_chip;
> - if (chip->of_node == np) {
> + if (chip->fwnode == of_fwnode_handle(np)) {
> if (offset < chip->ngpio)
> retval = chip->base + offset;
> break;
> @@ -1518,7 +1518,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
> bank->gpio_chip = st_gpio_template;
> bank->gpio_chip.base = bank_num * ST_GPIO_PINS_PER_BANK;
> bank->gpio_chip.ngpio = ST_GPIO_PINS_PER_BANK;
> - bank->gpio_chip.of_node = np;
> + bank->gpio_chip.fwnode = of_fwnode_handle(np);
> bank->gpio_chip.parent = dev;
> spin_lock_init(&bank->lock);
>
> --
> 2.35.1
>
Thanks.
--
Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Patrice Chotard <patrice.chotard@foss.st.com>
Subject: Re: [PATCH v1 1/1] pinctrl: st: Switch to use fwnode instead of of_node
Date: Mon, 10 Oct 2022 10:59:25 -0700 [thread overview]
Message-ID: <Y0RdfcC5FVRX/XI9@google.com> (raw)
In-Reply-To: <20221010075615.43244-1-andriy.shevchenko@linux.intel.com>
On Mon, Oct 10, 2022 at 10:56:15AM +0300, Andy Shevchenko wrote:
> The OF node in the GPIO library is deprecated and soon
> will be removed.
>
> GPIO library now accepts fwnode as a firmware node, so
> switch the driver to use it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/pinctrl/pinctrl-st.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index cf7f9cbe6044..987878c83349 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -1175,7 +1175,7 @@ static int st_pctl_dt_calculate_pin(struct st_pinctrl *info,
>
> for (i = 0; i < info->nbanks; i++) {
> chip = &info->banks[i].gpio_chip;
> - if (chip->of_node == np) {
> + if (chip->fwnode == of_fwnode_handle(np)) {
> if (offset < chip->ngpio)
> retval = chip->base + offset;
> break;
> @@ -1518,7 +1518,7 @@ static int st_gpiolib_register_bank(struct st_pinctrl *info,
> bank->gpio_chip = st_gpio_template;
> bank->gpio_chip.base = bank_num * ST_GPIO_PINS_PER_BANK;
> bank->gpio_chip.ngpio = ST_GPIO_PINS_PER_BANK;
> - bank->gpio_chip.of_node = np;
> + bank->gpio_chip.fwnode = of_fwnode_handle(np);
> bank->gpio_chip.parent = dev;
> spin_lock_init(&bank->lock);
>
> --
> 2.35.1
>
Thanks.
--
Dmitry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-10 17:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 7:56 [PATCH v1 1/1] pinctrl: st: Switch to use fwnode instead of of_node Andy Shevchenko
2022-10-10 7:56 ` Andy Shevchenko
2022-10-10 17:59 ` Dmitry Torokhov [this message]
2022-10-10 17:59 ` Dmitry Torokhov
2022-10-11 6:23 ` Patrice CHOTARD
2022-10-11 6:23 ` Patrice CHOTARD
2022-10-17 10:11 ` Linus Walleij
2022-10-17 10:11 ` 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=Y0RdfcC5FVRX/XI9@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andriy.shevchenko@linux.intel.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=patrice.chotard@foss.st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.