[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5cff2031-e25f-4222-4d1f-b0b7d87b355b@redhat.com>
Date: Wed, 13 Sep 2023 16:50:49 +0200
From: Hans de Goede <hdegoede@...hat.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andy@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Paul Cercueil <paul@...pouillou.net>,
Harvey Hunt <harveyhuntnexus@...il.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Daniel Scally <djrscally@...il.com>,
Mark Gross <markgross@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-mips@...r.kernel.org,
linux-mtd@...ts.infradead.org, platform-driver-x86@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 4/5] platform/x86: int3472/discrete: use
gpiod_set_active_low()
Hi,
On 9/13/23 13:50, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> Use the new polarity setter instead of the more cumbersome toggle
> function.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> ---
> drivers/platform/x86/intel/int3472/clk_and_regulator.c | 2 +-
> drivers/platform/x86/intel/int3472/led.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
> index ef4b3141efcd..31e520838b95 100644
> --- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
> +++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
> @@ -183,7 +183,7 @@ int skl_int3472_register_gpio_clock(struct int3472_discrete_device *int3472,
> }
>
> if (polarity == GPIO_ACTIVE_LOW)
> - gpiod_toggle_active_low(int3472->clock.ena_gpio);
> + gpiod_set_active_low(int3472->clock.ena_gpio);
>
> /* Ensure the pin is in output mode and non-active state */
> gpiod_direction_output(int3472->clock.ena_gpio, 0);
> diff --git a/drivers/platform/x86/intel/int3472/led.c b/drivers/platform/x86/intel/int3472/led.c
> index bca1ce7d0d0c..46c9c569df5e 100644
> --- a/drivers/platform/x86/intel/int3472/led.c
> +++ b/drivers/platform/x86/intel/int3472/led.c
> @@ -32,7 +32,7 @@ int skl_int3472_register_pled(struct int3472_discrete_device *int3472,
> "getting privacy LED GPIO\n");
>
> if (polarity == GPIO_ACTIVE_LOW)
> - gpiod_toggle_active_low(int3472->pled.gpio);
> + gpiod_set_active_low(int3472->pled.gpio);
>
> /* Ensure the pin is in output mode and non-active state */
> gpiod_direction_output(int3472->pled.gpio, 0);
Thanks. I agree that the new API is much better:
Acked-by: Hans de Goede <hdegoede@...hat.com>
Feel free to merge this through the GPIO tree.
Regards,
Hans
Powered by blists - more mailing lists