lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <PH0PR03MB651200B6A6495ABC520B46688E6AA@PH0PR03MB6512.namprd03.prod.outlook.com>
Date: Tue, 10 Jun 2025 11:01:36 +0000
From: "Hennerich, Michael" <Michael.Hennerich@...log.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
        Dmitry Torokhov
	<dmitry.torokhov@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>
CC: "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        Bartosz
 Golaszewski <bartosz.golaszewski@...aro.org>
Subject: RE: [PATCH RESEND 2/3] Input: adp5588 - use new GPIO line value
 setter callbacks



> -----Original Message-----
> From: Bartosz Golaszewski <brgl@...ev.pl>
> Sent: Tuesday, June 10, 2025 11:40 AM
> To: Hennerich, Michael <Michael.Hennerich@...log.com>; Dmitry Torokhov
> <dmitry.torokhov@...il.com>; Linus Walleij <linus.walleij@...aro.org>;
> Bartosz Golaszewski <brgl@...ev.pl>
> Cc: linux-input@...r.kernel.org; linux-kernel@...r.kernel.org; linux-
> gpio@...r.kernel.org; Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> Subject: [PATCH RESEND 2/3] Input: adp5588 - use new GPIO line value setter
> callbacks
> 
> 
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> 
> struct gpio_chip now has callbacks for setting line values that return an integer,
> allowing to indicate failures. Convert the driver to using them.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> ---
>  drivers/input/keyboard/adp5588-keys.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/keyboard/adp5588-keys.c
> b/drivers/input/keyboard/adp5588-keys.c
> index
> dc734974ce0687a6e850242b531979be8395b394..2b2aca08423a4ee658d
> b56f77bae25ef5a18e7a6 100644
> --- a/drivers/input/keyboard/adp5588-keys.c
> +++ b/drivers/input/keyboard/adp5588-keys.c
> @@ -232,8 +232,8 @@ static int adp5588_gpio_get_value(struct gpio_chip
> *chip, unsigned int off)
>  	return !!(val & bit);
>  }
> 
> -static void adp5588_gpio_set_value(struct gpio_chip *chip,
> -				   unsigned int off, int val)
> +static int adp5588_gpio_set_value(struct gpio_chip *chip, unsigned int off,
> +				  int val)
>  {
>  	struct adp5588_kpad *kpad = gpiochip_get_data(chip);
>  	unsigned int bank = ADP5588_BANK(kpad->gpiomap[off]); @@ -
> 246,7 +246,8 @@ static void adp5588_gpio_set_value(struct gpio_chip *chip,
>  	else
>  		kpad->dat_out[bank] &= ~bit;
> 
> -	adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank, kpad-
> >dat_out[bank]);
> +	return adp5588_write(kpad->client, GPIO_DAT_OUT1 + bank,
> +			     kpad->dat_out[bank]);
>  }
> 
>  static int adp5588_gpio_set_config(struct gpio_chip *chip,  unsigned int off,
> @@ -424,7 +425,7 @@ static int adp5588_gpio_add(struct adp5588_kpad
> *kpad)
>  	kpad->gc.direction_input = adp5588_gpio_direction_input;
>  	kpad->gc.direction_output = adp5588_gpio_direction_output;
>  	kpad->gc.get = adp5588_gpio_get_value;
> -	kpad->gc.set = adp5588_gpio_set_value;
> +	kpad->gc.set_rv = adp5588_gpio_set_value;
>  	kpad->gc.set_config = adp5588_gpio_set_config;
>  	kpad->gc.can_sleep = 1;
> 
> 
> --
> 2.48.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ