Re: [PATCH] pinctrl: samsung: Calculate GPIO base for pinctrl_add_gpio_range

From: Charles Keepax
Date: Tue Feb 28 2017 - 04:06:44 EST


On Mon, Feb 27, 2017 at 11:13:59AM +0900, Tomasz Figa wrote:
> > diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> > index ddc8d6b..864d8b4d 100644
> > --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> > +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> > @@ -882,7 +882,7 @@ static int samsung_pinctrl_register(struct platform_device *pdev,
> > pin_bank->grange.id = bank;
> > pin_bank->grange.pin_base = drvdata->pin_base
> > + pin_bank->pin_base;
> > - pin_bank->grange.base = pin_bank->gpio_chip.base;
> > + pin_bank->grange.base = pin_bank->grange.pin_base;
>
> If we are not reading the base from the GPIO bank anymore, maybe it
> could make sense to actually make samsung_gpiolib_register() use
> bank->grange.base as gc->base? This way we would avoid explicitly
> numbering two times.
>

Yeah no problem I can respin with that included.

Thanks,
Charles