[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DAJIR40MBKSP.11QTS156Y7NH2@linaro.com>
Date: Wed, 11 Jun 2025 08:17:58 +0100
From: Rui Miguel Silva <rmfrfs@...il.com>
To: "Bartosz Golaszewski" <brgl@...ev.pl>, "Rui Miguel Silva"
<rmfrfs@...il.com>, "Johan Hovold" <johan@...nel.org>, "Alex Elder"
<elder@...nel.org>, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
Cc: <greybus-dev@...ts.linaro.org>, <linux-staging@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, "Bartosz Golaszewski"
<bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] staging: greybus: remove unnecessary GPIO line
direction check
Hey Bartosz,
Thanks for the patch.
On Tue Jun 10, 2025 at 4:20 PM WEST, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> As of commit 92ac7de3175e3 ("gpiolib: don't allow setting values on input
> lines"), the GPIO core makes sure values cannot be set on input lines.
> Remove the unnecessary check.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
LGTM.
Reviewed-by: Rui Miguel Silva <rui.silva@...aro.org>
Cheers,
Rui
> ---
> drivers/staging/greybus/gpio.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c
> index f81c34160f720..1280530c8987a 100644
> --- a/drivers/staging/greybus/gpio.c
> +++ b/drivers/staging/greybus/gpio.c
> @@ -192,12 +192,6 @@ static int gb_gpio_set_value_operation(struct gb_gpio_controller *ggc,
> struct gb_gpio_set_value_request request;
> int ret;
>
> - if (ggc->lines[which].direction == 1) {
> - dev_warn(dev, "refusing to set value of input gpio %u\n",
> - which);
> - return -EPERM;
> - }
> -
> request.which = which;
> request.value = value_high ? 1 : 0;
> ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_VALUE,
> --
> 2.48.1
Powered by blists - more mailing lists