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] [thread-next>] [day] [month] [year] [list]
Message-Id: <D0I0M4T4O9G1.UUESU247CE42@baylibre.com>
Date: Fri, 12 Apr 2024 10:52:43 +0200
From: "Esteban Blanc" <eblanc@...libre.com>
To: "Bhargav Raviprakash" <bhargav.r@...s.com>,
 <linux-kernel@...r.kernel.org>
Cc: <m.nirmaladevi@...s.com>, <lee@...nel.org>, <robh+dt@...nel.org>,
 <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
 <jpanis@...libre.com>, <devicetree@...r.kernel.org>, <arnd@...db.de>,
 <gregkh@...uxfoundation.org>, <lgirdwood@...il.com>, <broonie@...nel.org>,
 <linus.walleij@...aro.org>, <linux-gpio@...r.kernel.org>,
 <linux-arm-kernel@...ts.infradead.org>, <nm@...com>, <vigneshr@...com>,
 <kristo@...nel.org>
Subject: Re: [PATCH v6 10/11] pinctrl: pinctrl-tps6594: Add TPS65224 PMIC
 pinctrl and GPIO

On Mon Apr 8, 2024 at 2:40 PM CEST, Bhargav Raviprakash wrote:
> From: Nirmala Devi Mal Nadar <m.nirmaladevi@...s.com>
>
> Add support for TPS65224 pinctrl and GPIOs to TPS6594 driver as they have
> significant functional overlap.
> TPS65224 PMIC has 6 GPIOS which can be configured as GPIO or other
> dedicated device functions.
>
> Signed-off-by: Nirmala Devi Mal Nadar <m.nirmaladevi@...s.com>
> Signed-off-by: Bhargav Raviprakash <bhargav.r@...s.com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  drivers/pinctrl/pinctrl-tps6594.c | 275 +++++++++++++++++++++++++-----
>  1 file changed, 228 insertions(+), 47 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-tps6594.c b/drivers/pinctrl/pinctrl-tps6594.c
> index 66985e54b..f3d1c1518 100644
> --- a/drivers/pinctrl/pinctrl-tps6594.c
> +++ b/drivers/pinctrl/pinctrl-tps6594.c
> @@ -338,8 +506,20 @@ static int tps6594_pinctrl_probe(struct platform_device *pdev)
>  	config.parent = tps->dev;
>  	config.regmap = tps->regmap;
> -	config.ngpio = TPS6594_PINCTRL_PINS_NB;
> -	config.ngpio_per_reg = 8;
> +	switch (tps->chip_id) {
> +	case TPS65224:
> +		config.ngpio = ARRAY_SIZE(tps65224_gpio_func_group_names);
> +		config.ngpio_per_reg = TPS65224_NGPIO_PER_REG;
> +		break;
> +	case TPS6593:
> +	case TPS6594:
> +		config.ngpio = ARRAY_SIZE(tps6594_gpio_func_group_names);
> +		config.ngpio_per_reg = TPS6594_NGPIO_PER_REG;
> +		break;
> +	default:
> +		break;
> +	}

Please merge the two switch case. 

Other than that I think it's ok.

Best regards,

-- 
Esteban "Skallwar" Blanc
BayLibre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ