public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Rui Miguel Silva <rmfrfs@gmail.com>
To: "Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Rui Miguel Silva" <rmfrfs@gmail.com>,
	"Johan Hovold" <johan@kernel.org>,
	"Alex Elder" <elder@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: <greybus-dev@lists.linaro.org>, <linux-staging@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>,
	"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH] staging: greybus: remove unnecessary GPIO line direction check
Date: Wed, 11 Jun 2025 08:17:58 +0100	[thread overview]
Message-ID: <DAJIR40MBKSP.11QTS156Y7NH2@linaro.com> (raw)
In-Reply-To: <20250610152036.86099-1-brgl@bgdev.pl>

Hey Bartosz,
Thanks for the patch.

On Tue Jun 10, 2025 at 4:20 PM WEST, Bartosz Golaszewski wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.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@linaro.org>

LGTM.

Reviewed-by: Rui Miguel Silva <rui.silva@linaro.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




      reply	other threads:[~2025-06-11  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 15:20 [PATCH] staging: greybus: remove unnecessary GPIO line direction check Bartosz Golaszewski
2025-06-11  7:17 ` Rui Miguel Silva [this message]

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=DAJIR40MBKSP.11QTS156Y7NH2@linaro.com \
    --to=rmfrfs@gmail.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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