All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Renner Berthing <emil.renner.berthing@canonical.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andy@kernel.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Emil Renner Berthing <kernel@esmil.dk>,
	Jianlong Huang <jianlong.huang@starfivetech.com>,
	Hal Feng <hal.feng@starfivetech.com>
Subject: Re: [PATCH 18/36] pinctrl: starfive: use new pinctrl GPIO helpers
Date: Wed, 4 Oct 2023 02:37:06 -0700	[thread overview]
Message-ID: <CAJM55Z8S_4OGM_-iEACLzZgwt6_KoYr56RbPn+4kx7Beu2WjUg@mail.gmail.com> (raw)
In-Reply-To: <20231003145114.21637-19-brgl@bgdev.pl>

Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Replace the pinctrl helpers taking the global GPIO number as argument
> with the improved variants that instead take a pointer to the GPIO chip
> and the controller-relative offset.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 4 ++--
>  drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> index 530fe340a9a1..22a2db8fa315 100644
> --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> @@ -918,12 +918,12 @@ static struct pinctrl_desc starfive_desc = {
>
>  static int starfive_gpio_request(struct gpio_chip *gc, unsigned int gpio)
>  {
> -	return pinctrl_gpio_request(gc->base + gpio);
> +	return pinctrl_gpio_request_new(gc, gpio);
>  }
>
>  static void starfive_gpio_free(struct gpio_chip *gc, unsigned int gpio)
>  {
> -	pinctrl_gpio_free(gc->base + gpio);
> +	pinctrl_gpio_free_new(gc, gpio);

Hi Bartosz,

Thank you for the patch. These new pinctrl_gpio_*_new() functions now seem to
have the same signature as the starfive_gpio_*() functions. Is there a reason
they can't be used as callbacks directly so we could just delete the
starfive_gpio_*() wrapppers?

Also it'd be great to be to be CC'd on at least the first generic patches where
the new functions are introduced to have some context without having to look it
up on lore.

/Emil

>  }
>
>  static int starfive_gpio_get_direction(struct gpio_chip *gc, unsigned int gpio)
> diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
> index 640f827a9b2c..5557ef3fbeb2 100644
> --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
> +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
> @@ -547,12 +547,12 @@ static const struct pinconf_ops jh7110_pinconf_ops = {
>
>  static int jh7110_gpio_request(struct gpio_chip *gc, unsigned int gpio)
>  {
> -	return pinctrl_gpio_request(gc->base + gpio);
> +	return pinctrl_gpio_request_new(gc, gpio);
>  }
>
>  static void jh7110_gpio_free(struct gpio_chip *gc, unsigned int gpio)
>  {
> -	pinctrl_gpio_free(gc->base + gpio);
> +	pinctrl_gpio_free_new(gc, gpio);
>  }
>
>  static int jh7110_gpio_get_direction(struct gpio_chip *gc,
> --
> 2.39.2

  reply	other threads:[~2023-10-04  9:37 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 14:50 [PATCH 00/36] pinctrl: don't use GPIOLIB global numberspace in helpers Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 01/36] pinctrl: remove unneeded extern specifiers from consumer.h Bartosz Golaszewski
2023-10-03 21:39   ` Linus Walleij
2023-10-03 14:50 ` [PATCH 02/36] pinctrl: provide new GPIO-to-pinctrl glue helpers Bartosz Golaszewski
2023-10-03 15:08   ` Andy Shevchenko
2023-10-03 15:10     ` Andy Shevchenko
2023-10-03 14:50 ` [PATCH 03/36] gpiolib: generic: use new pinctrl GPIO helpers Bartosz Golaszewski
2023-10-03 15:14   ` Andy Shevchenko
2023-10-03 14:50 ` [PATCH 04/36] gpio: cdev: use pinctrl_gpio_can_use_line_new() Bartosz Golaszewski
2023-10-03 15:02   ` Kent Gibson
2023-10-03 15:17     ` Andy Shevchenko
2023-10-03 15:24       ` Kent Gibson
2023-10-03 18:07         ` Bartosz Golaszewski
2023-10-04  4:16           ` Kent Gibson
2023-10-04  7:52             ` Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 05/36] gpio: rcar: use new pinctrl GPIO helpers Bartosz Golaszewski
2023-10-09 11:22   ` Geert Uytterhoeven
2023-10-03 14:50 ` [PATCH 06/36] gpio: tegra: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 07/36] gpio: em: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 08/36] gpio: aspeed: " Bartosz Golaszewski
2023-10-03 14:50   ` Bartosz Golaszewski
2023-10-03 23:30   ` Andrew Jeffery
2023-10-03 23:30     ` Andrew Jeffery
2023-10-04  7:13     ` Bartosz Golaszewski
2023-10-04  7:13       ` Bartosz Golaszewski
2023-10-09  9:45   ` Uwe Kleine-König
2023-10-09  9:45     ` Uwe Kleine-König
2023-10-03 14:50 ` [PATCH 09/36] gpio: mvebu: " Bartosz Golaszewski
2023-10-09  9:44   ` Uwe Kleine-König
2023-10-03 14:50 ` [PATCH 10/36] gpio: pxa: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 11/36] gpio: rockchip: " Bartosz Golaszewski
2023-10-03 14:50   ` Bartosz Golaszewski
2023-10-05  9:58   ` Heiko Stübner
2023-10-05  9:58     ` Heiko Stübner
2023-10-03 14:50 ` [PATCH 12/36] gpio: vf610: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 13/36] pinctrl: nuvoton: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 14/36] pinctrl: renesas: " Bartosz Golaszewski
2023-10-09 11:22   ` Geert Uytterhoeven
2023-10-03 14:50 ` [PATCH 15/36] pinctrl: bcm: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 16/36] pinctrl: stm32: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 17/36] pinctrl: spear: " Bartosz Golaszewski
2023-10-04  6:01   ` Viresh Kumar
2023-12-06 16:19   ` patchwork-bot+linux-soc
2023-10-03 14:50 ` [PATCH 18/36] pinctrl: starfive: " Bartosz Golaszewski
2023-10-04  9:37   ` Emil Renner Berthing [this message]
2023-10-04  9:39     ` Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 19/36] pinctrl: ocelot: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 20/36] pinctrl: rk805: " Bartosz Golaszewski
2023-10-03 14:50 ` [PATCH 21/36] pinctrl: cirrus: " Bartosz Golaszewski
2023-10-03 15:41   ` Charles Keepax
2023-10-03 14:51 ` [PATCH 22/36] pinctrl: mediatek: " Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 23/36] pinctrl: axp209: " Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 24/36] pinctrl: vt8500: " Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 25/36] pinctrl: cy8c95x0: " Bartosz Golaszewski
2023-10-03 15:11   ` Andy Shevchenko
2023-10-03 14:51 ` [PATCH 26/36] pinctrl: as3722: " Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 27/36] pinctrl: ingenic: " Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 28/36] pinctrl: intel: " Bartosz Golaszewski
2023-10-03 15:12   ` Andy Shevchenko
2023-10-04  7:33   ` Mika Westerberg
2023-10-03 14:51 ` [PATCH 29/36] pinctrl: st: " Bartosz Golaszewski
2023-10-04 14:41   ` Patrice CHOTARD
2023-10-03 14:51 ` [PATCH 30/36] pinctrl: remove old " Bartosz Golaszewski
2023-10-03 15:20   ` Andy Shevchenko
2023-10-04  8:49     ` Bartosz Golaszewski
2023-10-04 12:45       ` Andy Shevchenko
2023-10-03 18:34   ` kernel test robot
2023-10-03 14:51 ` [PATCH 31/36] treewide: rename pinctrl_gpio_can_use_line_new() Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 32/36] treewide: rename pinctrl_gpio_request_new() Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 33/36] treewide: rename pinctrl_gpio_free_new() Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 34/36] treewide: rename pinctrl_gpio_direction_input_new() Bartosz Golaszewski
2023-10-03 15:16   ` Andy Shevchenko
2023-10-03 19:08     ` Bartosz Golaszewski
2023-10-04 12:49       ` Andy Shevchenko
2023-10-04 12:53         ` Andy Shevchenko
2023-10-04 14:46           ` Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 35/36] treewide: rename pinctrl_gpio_direction_output_new() Bartosz Golaszewski
2023-10-03 14:51 ` [PATCH 36/36] treewide: rename pinctrl_gpio_set_config_new() Bartosz Golaszewski
2023-10-03 21:51 ` [PATCH 00/36] pinctrl: don't use GPIOLIB global numberspace in helpers Linus Walleij
2023-10-04  8:12   ` Bartosz Golaszewski
2023-10-04  8:42     ` Linus Walleij
2023-10-04  9:35       ` Andy Shevchenko
2023-10-04  9:40         ` Bartosz Golaszewski
2023-10-04 12:55           ` Andy Shevchenko

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=CAJM55Z8S_4OGM_-iEACLzZgwt6_KoYr56RbPn+4kx7Beu2WjUg@mail.gmail.com \
    --to=emil.renner.berthing@canonical.com \
    --cc=andy@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=hal.feng@starfivetech.com \
    --cc=jianlong.huang@starfivetech.com \
    --cc=kernel@esmil.dk \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 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.