Re: [PATCH 3/3] pinctrl: sx150x: add a static gpio/pinctrl pin range mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-01-17 at 14:34 +0100, Peter Rosin wrote:
> Without such a range, gpiolib fails with -EPROBE_DEFER, pending the
> addition of the range. So, without a range, gpiolib will keep
> deferring indefinitely.
> 
> Fixes: e10f72bf4b3e ("gpio: gpiolib: Generalise state persistence beyond sleep")

This is a bit of a nit-pick, but I'd argue the hazard always existed in
the pinctrl-sx150x's probe however hadn't been triggered until now. My
instinct is Fixes should instead point to 9e80f9064e73 ("pinctrl: Add
SX150X GPIO Extender Pinctrl Driver"). Having said that I still think
it's worth pointing out in the commit message that e10f72bf4b3e ("gpio:
gpiolib: Generalise state persistence beyond sleep") is the motivation
for your patch (i.e. mention both commits).

Regardless, thanks to you both for getting to the bottom of this.

Andrew

> Suggested-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Peter Rosin <peda@xxxxxxxxxx>
> ---
>  drivers/pinctrl/pinctrl-sx150x.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
> index 049dd15e04ef..cbf58a10113d 100644
> --- a/drivers/pinctrl/pinctrl-sx150x.c
> +++ b/drivers/pinctrl/pinctrl-sx150x.c
> @@ -1193,6 +1193,11 @@ static int sx150x_probe(struct i2c_client *client,
>  	if (ret)
>  		return ret;
>  
> +	ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev),
> +				     0, 0, pctl->data->npins);
> +	if (ret)
> +		return ret;
> +
>  	/* Add Interrupt support if an irq is specified */
>  	if (client->irq > 0) {
>  		pctl->irq_chip.name = devm_kstrdup(dev, client->name,

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux