linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Romain Gantois <romain.gantois@bootlin.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 1/2] misc: ti-fpc202: remove unneeded direction check
Date: Thu, 17 Jul 2025 17:26:57 +0200	[thread overview]
Message-ID: <14379725.uLZWGnKmhe@fw-rgant> (raw)
In-Reply-To: <20250717130357.53491-1-brgl@bgdev.pl>

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

Hi Bartosz,

On Thursday, 17 July 2025 15:03:55 CEST 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>
> ---
>  drivers/misc/ti_fpc202.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/misc/ti_fpc202.c b/drivers/misc/ti_fpc202.c
> index f7cde245ac95..ca415ef45cbe 100644
> --- a/drivers/misc/ti_fpc202.c
> +++ b/drivers/misc/ti_fpc202.c
> @@ -125,9 +125,6 @@ static void fpc202_gpio_set(struct gpio_chip *chip,
> unsigned int offset, int ret;
>  	u8 val;
> 
> -	if (fpc202_gpio_get_dir(offset) == GPIO_LINE_DIRECTION_IN)
> -		return;
> -
>  	ret = fpc202_read(priv, FPC202_REG_OUT_A_OUT_B_VAL);
>  	if (ret < 0) {
>  		dev_err(&priv->client->dev, "Failed to set GPIO %d value! err 
%d\n",
> offset, ret);

LGTM

Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2025-07-17 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 13:03 [PATCH 1/2] misc: ti-fpc202: remove unneeded direction check Bartosz Golaszewski
2025-07-17 13:03 ` [PATCH 2/2] misc: ti-fpc202: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-07-17 13:32   ` Bartosz Golaszewski
2025-07-17 14:34     ` Greg Kroah-Hartman
2025-07-17 14:33   ` Greg Kroah-Hartman
2025-07-17 15:32   ` Romain Gantois
2025-07-17 14:33 ` [PATCH 1/2] misc: ti-fpc202: remove unneeded direction check Greg Kroah-Hartman
2025-07-17 15:26 ` Romain Gantois [this message]
2025-07-18  7:55 ` Bartosz Golaszewski

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=14379725.uLZWGnKmhe@fw-rgant \
    --to=romain.gantois@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=gregkh@linuxfoundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).