lkml.org 
[lkml]   [2024]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 10/11] pinctrl: pinctrl-tps6594: Add TPS65224 PMIC pinctrl and GPIO
Date
On Fri, 12 Apr 2024 10:52:43 +0200, Esteban Blanc wrote:
> On Mon Apr 8, 2024 at 2:40 PM CEST, Bhargav Raviprakash wrote:
> > From: Nirmala Devi Mal Nadar <m.nirmaladevi@ltts.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@ltts.com>
> > Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
> > Acked-by: Linus Walleij <linus.walleij@linaro.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

Thanks! I will merge those switch cases in the next version.

Regards,
Bhargav

\
 
 \ /
  Last update: 2024-04-17 12:39    [W:0.042 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site