* [PATCH] pca953x: Add optional reset gpio control @ 2017-01-02 21:07 Steve Longerbeam 2017-01-02 21:07 ` [PATCH] gpio: " Steve Longerbeam 0 siblings, 1 reply; 11+ messages in thread From: Steve Longerbeam @ 2017-01-02 21:07 UTC (permalink / raw) To: linus.walleij, gnurou, robh+dt, mark.rutland Cc: linux-gpio, devicetree, linux-kernel, Steve Longerbeam Add optional reset-gpios pin control. If present, de-assert the specified reset gpio pin to bring the chip out of reset. Steve Longerbeam (1): gpio: pca953x: Add optional reset gpio control Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ drivers/gpio/gpio-pca953x.c | 11 +++++++++++ 2 files changed, 15 insertions(+) -- 2.7.4 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] gpio: pca953x: Add optional reset gpio control 2017-01-02 21:07 [PATCH] pca953x: Add optional reset gpio control Steve Longerbeam @ 2017-01-02 21:07 ` Steve Longerbeam 2017-01-03 23:37 ` Andy Shevchenko ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Steve Longerbeam @ 2017-01-02 21:07 UTC (permalink / raw) To: linus.walleij, gnurou, robh+dt, mark.rutland Cc: linux-gpio, devicetree, linux-kernel, Steve Longerbeam Add optional reset-gpios pin control. If present, de-assert the specified reset gpio pin to bring the chip out of reset. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ drivers/gpio/gpio-pca953x.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt index 08dd15f..da54f4c 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt @@ -29,6 +29,10 @@ Required properties: onsemi,pca9654 exar,xra1202 +Optional properties: + - reset-gpios: GPIO specification for the RESET input + + Example: diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index d5d72d8..ca2ddea 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -22,6 +22,7 @@ #include <linux/of_platform.h> #include <linux/acpi.h> #include <linux/regulator/consumer.h> +#include <linux/gpio/consumer.h> #define PCA953X_INPUT 0 #define PCA953X_OUTPUT 1 @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, invert = pdata->invert; chip->names = pdata->names; } else { + struct gpio_desc *reset_gpio; + chip->gpio_start = -1; irq_base = 0; + + /* see if we need to de-assert a reset pin */ + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", + GPIOD_OUT_LOW); + if (IS_ERR(reset_gpio)) { + dev_err(&client->dev, "request for reset pin failed\n"); + return PTR_ERR(reset_gpio); + } } chip->client = client; -- 2.7.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control 2017-01-02 21:07 ` [PATCH] gpio: " Steve Longerbeam @ 2017-01-03 23:37 ` Andy Shevchenko [not found] ` <CAHp75VeCKPy4B51P_N9Bp03zPUbRodKzitc-n16ZRKJWcEF4fA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> [not found] ` <1483391271-17304-2-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 2017-01-04 13:22 ` Rob Herring 2 siblings, 1 reply; 11+ messages in thread From: Andy Shevchenko @ 2017-01-03 23:37 UTC (permalink / raw) To: Steve Longerbeam Cc: Linus Walleij, Alexandre Courbot, Rob Herring, Mark Rutland, linux-gpio@vger.kernel.org, devicetree, linux-kernel@vger.kernel.org, Steve Longerbeam On Mon, Jan 2, 2017 at 11:07 PM, Steve Longerbeam <slongerbeam@gmail.com> wrote: > Add optional reset-gpios pin control. If present, de-assert the > specified reset gpio pin to bring the chip out of reset. > --- a/drivers/gpio/gpio-pca953x.c > +++ b/drivers/gpio/gpio-pca953x.c > @@ -22,6 +22,7 @@ > #include <linux/of_platform.h> > #include <linux/acpi.h> > #include <linux/regulator/consumer.h> > +#include <linux/gpio/consumer.h> Please, try to put it somehow alphabetically ordered (yes, I see it's not in general, but try to squeeze it into longest part which is ordered). > > #define PCA953X_INPUT 0 > #define PCA953X_OUTPUT 1 > @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, > invert = pdata->invert; > chip->names = pdata->names; > } else { > + struct gpio_desc *reset_gpio; > + > chip->gpio_start = -1; > irq_base = 0; > + > + /* see if we need to de-assert a reset pin */ see -> See > + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", > + GPIOD_OUT_LOW); Shouldn't be _optional_exclusive? See this recent discussion https://patchwork.ozlabs.org/patch/706002/ > + if (IS_ERR(reset_gpio)) { > + dev_err(&client->dev, "request for reset pin failed\n"); > + return PTR_ERR(reset_gpio); > + } > } -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <CAHp75VeCKPy4B51P_N9Bp03zPUbRodKzitc-n16ZRKJWcEF4fA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control [not found] ` <CAHp75VeCKPy4B51P_N9Bp03zPUbRodKzitc-n16ZRKJWcEF4fA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-01-04 10:20 ` Vladimir Zapolskiy [not found] ` <7bfce806-7670-0bf3-bdf2-00aaf68b5b11-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 2017-01-10 18:57 ` Steve Longerbeam 1 sibling, 1 reply; 11+ messages in thread From: Vladimir Zapolskiy @ 2017-01-04 10:20 UTC (permalink / raw) To: Andy Shevchenko, Steve Longerbeam Cc: Linus Walleij, Alexandre Courbot, Rob Herring, Mark Rutland, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Steve Longerbeam On 01/04/2017 01:37 AM, Andy Shevchenko wrote: > On Mon, Jan 2, 2017 at 11:07 PM, Steve Longerbeam <slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Add optional reset-gpios pin control. If present, de-assert the >> specified reset gpio pin to bring the chip out of reset. > >> --- a/drivers/gpio/gpio-pca953x.c >> +++ b/drivers/gpio/gpio-pca953x.c >> @@ -22,6 +22,7 @@ >> #include <linux/of_platform.h> >> #include <linux/acpi.h> >> #include <linux/regulator/consumer.h> > >> +#include <linux/gpio/consumer.h> > > Please, try to put it somehow alphabetically ordered (yes, I see it's > not in general, but try to squeeze it into longest part which is > ordered). > >> >> #define PCA953X_INPUT 0 >> #define PCA953X_OUTPUT 1 >> @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, >> invert = pdata->invert; >> chip->names = pdata->names; >> } else { >> + struct gpio_desc *reset_gpio; >> + >> chip->gpio_start = -1; >> irq_base = 0; >> + >> + /* see if we need to de-assert a reset pin */ > > see -> See > >> + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", >> + GPIOD_OUT_LOW); > > Shouldn't be _optional_exclusive? > See this recent discussion https://patchwork.ozlabs.org/patch/706002/ There is no devm_gpiod_get_optional_exclusive(), probably you confuse the function with devm_reset_control_get_optional_exclusive(). >> + if (IS_ERR(reset_gpio)) { >> + dev_err(&client->dev, "request for reset pin failed\n"); >> + return PTR_ERR(reset_gpio); >> + } >> } > -- With best wishes, Vladimir -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <7bfce806-7670-0bf3-bdf2-00aaf68b5b11-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control [not found] ` <7bfce806-7670-0bf3-bdf2-00aaf68b5b11-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> @ 2017-01-04 10:31 ` Andy Shevchenko 2017-01-10 19:10 ` Steve Longerbeam 0 siblings, 1 reply; 11+ messages in thread From: Andy Shevchenko @ 2017-01-04 10:31 UTC (permalink / raw) To: Vladimir Zapolskiy Cc: Steve Longerbeam, Linus Walleij, Alexandre Courbot, Rob Herring, Mark Rutland, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Steve Longerbeam On Wed, Jan 4, 2017 at 12:20 PM, Vladimir Zapolskiy <vladimir_zapolskiy-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> wrote: > On 01/04/2017 01:37 AM, Andy Shevchenko wrote: >> On Mon, Jan 2, 2017 at 11:07 PM, Steve Longerbeam <slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> Add optional reset-gpios pin control. If present, de-assert the >>> specified reset gpio pin to bring the chip out of reset. >> >>> --- a/drivers/gpio/gpio-pca953x.c >>> +++ b/drivers/gpio/gpio-pca953x.c >>> @@ -22,6 +22,7 @@ >>> #include <linux/of_platform.h> >>> #include <linux/acpi.h> >>> #include <linux/regulator/consumer.h> >> >>> +#include <linux/gpio/consumer.h> >> >> Please, try to put it somehow alphabetically ordered (yes, I see it's >> not in general, but try to squeeze it into longest part which is >> ordered). >> >>> >>> #define PCA953X_INPUT 0 >>> #define PCA953X_OUTPUT 1 >>> @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, >>> invert = pdata->invert; >>> chip->names = pdata->names; >>> } else { >>> + struct gpio_desc *reset_gpio; >>> + >>> chip->gpio_start = -1; >>> irq_base = 0; >>> + >>> + /* see if we need to de-assert a reset pin */ >> >> see -> See >> >>> + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", >>> + GPIOD_OUT_LOW); >> >> Shouldn't be _optional_exclusive? >> See this recent discussion https://patchwork.ozlabs.org/patch/706002/ > > There is no devm_gpiod_get_optional_exclusive(), probably you confuse > the function with devm_reset_control_get_optional_exclusive(). Perhaps it's time to add drivers/reset/reset-gpio.c ? > >>> + if (IS_ERR(reset_gpio)) { >>> + dev_err(&client->dev, "request for reset pin failed\n"); >>> + return PTR_ERR(reset_gpio); >>> + } >>> } >> > > -- > With best wishes, > Vladimir -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control 2017-01-04 10:31 ` Andy Shevchenko @ 2017-01-10 19:10 ` Steve Longerbeam 0 siblings, 0 replies; 11+ messages in thread From: Steve Longerbeam @ 2017-01-10 19:10 UTC (permalink / raw) To: Andy Shevchenko, Vladimir Zapolskiy Cc: Linus Walleij, Alexandre Courbot, Rob Herring, Mark Rutland, linux-gpio@vger.kernel.org, devicetree, linux-kernel@vger.kernel.org, Steve Longerbeam On 01/04/2017 02:31 AM, Andy Shevchenko wrote: > >>>> + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", >>>> + GPIOD_OUT_LOW); >>> Shouldn't be _optional_exclusive? >>> See this recent discussion https://patchwork.ozlabs.org/patch/706002/ >> There is no devm_gpiod_get_optional_exclusive(), probably you confuse >> the function with devm_reset_control_get_optional_exclusive(). > Perhaps it's time to add > drivers/reset/reset-gpio.c ? Yeah, looks like a GPIO based reset controller driver would need to be implemented in order to go this route. The max7310 nodes in imx6qdl-sabreauto.dtsi could then refer to that reset controller by the 'resets' phandle. There are many many devices that would benefit from a GPIO reset controller, I count 143 nodes under arch/arm/boot/dts that specify a 'reset-gpios' property. But I don't have the time to write such a driver. So I would propose just keeping the devm_gpiod_get_optional() call here. When such a gpio reset controller is written, the work can begin to convert all the gpio reset users to make use of it. Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control [not found] ` <CAHp75VeCKPy4B51P_N9Bp03zPUbRodKzitc-n16ZRKJWcEF4fA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-01-04 10:20 ` Vladimir Zapolskiy @ 2017-01-10 18:57 ` Steve Longerbeam 1 sibling, 0 replies; 11+ messages in thread From: Steve Longerbeam @ 2017-01-10 18:57 UTC (permalink / raw) To: Andy Shevchenko Cc: Linus Walleij, Alexandre Courbot, Rob Herring, Mark Rutland, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Steve Longerbeam On 01/03/2017 03:37 PM, Andy Shevchenko wrote: > On Mon, Jan 2, 2017 at 11:07 PM, Steve Longerbeam <slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Add optional reset-gpios pin control. If present, de-assert the >> specified reset gpio pin to bring the chip out of reset. >> --- a/drivers/gpio/gpio-pca953x.c >> +++ b/drivers/gpio/gpio-pca953x.c >> @@ -22,6 +22,7 @@ >> #include <linux/of_platform.h> >> #include <linux/acpi.h> >> #include <linux/regulator/consumer.h> >> +#include <linux/gpio/consumer.h> > Please, try to put it somehow alphabetically ordered (yes, I see it's > not in general, but try to squeeze it into longest part which is > ordered). done. > >> #define PCA953X_INPUT 0 >> #define PCA953X_OUTPUT 1 >> @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, >> invert = pdata->invert; >> chip->names = pdata->names; >> } else { >> + struct gpio_desc *reset_gpio; >> + >> chip->gpio_start = -1; >> irq_base = 0; >> + >> + /* see if we need to de-assert a reset pin */ > see -> See done. Steve -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <1483391271-17304-2-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control [not found] ` <1483391271-17304-2-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> @ 2017-01-04 10:25 ` Vladimir Zapolskiy 2017-01-10 19:13 ` Steve Longerbeam 0 siblings, 1 reply; 11+ messages in thread From: Vladimir Zapolskiy @ 2017-01-04 10:25 UTC (permalink / raw) To: Steve Longerbeam, linus.walleij-QSEj5FYQhm4dnm+yROfE0A, gnurou-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8 Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Steve Longerbeam Hi Steve, On 01/02/2017 11:07 PM, Steve Longerbeam wrote: > Add optional reset-gpios pin control. If present, de-assert the > specified reset gpio pin to bring the chip out of reset. > > Signed-off-by: Steve Longerbeam <steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> > Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > Cc: Alexandre Courbot <gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > --- > Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ > drivers/gpio/gpio-pca953x.c | 11 +++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > index 08dd15f..da54f4c 100644 > --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > @@ -29,6 +29,10 @@ Required properties: > onsemi,pca9654 > exar,xra1202 > > +Optional properties: > + - reset-gpios: GPIO specification for the RESET input > + > + Drop the surplus empty line above. > Example: > > > diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c > index d5d72d8..ca2ddea 100644 > --- a/drivers/gpio/gpio-pca953x.c > +++ b/drivers/gpio/gpio-pca953x.c > @@ -22,6 +22,7 @@ > #include <linux/of_platform.h> > #include <linux/acpi.h> > #include <linux/regulator/consumer.h> > +#include <linux/gpio/consumer.h> > > #define PCA953X_INPUT 0 > #define PCA953X_OUTPUT 1 > @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, > invert = pdata->invert; > chip->names = pdata->names; > } else { > + struct gpio_desc *reset_gpio; > + > chip->gpio_start = -1; > irq_base = 0; > + > + /* see if we need to de-assert a reset pin */ > + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", > + GPIOD_OUT_LOW); > + if (IS_ERR(reset_gpio)) { > + dev_err(&client->dev, "request for reset pin failed\n"); I'm not confident that the error message is wanted here, you may consider either to remove it or at least print it out if (PTR_ERR(reset_gpio) != -EPROBE_DEFER). > + return PTR_ERR(reset_gpio); > + } > } > > chip->client = client; > Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> -- With best wishes, Vladimir -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control 2017-01-04 10:25 ` Vladimir Zapolskiy @ 2017-01-10 19:13 ` Steve Longerbeam 0 siblings, 0 replies; 11+ messages in thread From: Steve Longerbeam @ 2017-01-10 19:13 UTC (permalink / raw) To: Vladimir Zapolskiy, linus.walleij, gnurou, robh+dt, mark.rutland Cc: linux-gpio, devicetree, linux-kernel, Steve Longerbeam On 01/04/2017 02:25 AM, Vladimir Zapolskiy wrote: > Hi Steve, > > On 01/02/2017 11:07 PM, Steve Longerbeam wrote: >> Add optional reset-gpios pin control. If present, de-assert the >> specified reset gpio pin to bring the chip out of reset. >> >> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> >> Cc: Linus Walleij <linus.walleij@linaro.org> >> Cc: Alexandre Courbot <gnurou@gmail.com> >> Cc: linux-gpio@vger.kernel.org >> Cc: linux-kernel@vger.kernel.org >> --- >> Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ >> drivers/gpio/gpio-pca953x.c | 11 +++++++++++ >> 2 files changed, 15 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt >> index 08dd15f..da54f4c 100644 >> --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt >> +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt >> @@ -29,6 +29,10 @@ Required properties: >> onsemi,pca9654 >> exar,xra1202 >> >> +Optional properties: >> + - reset-gpios: GPIO specification for the RESET input >> + >> + > Drop the surplus empty line above. done. > >> Example: >> >> >> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c >> index d5d72d8..ca2ddea 100644 >> --- a/drivers/gpio/gpio-pca953x.c >> +++ b/drivers/gpio/gpio-pca953x.c >> @@ -22,6 +22,7 @@ >> #include <linux/of_platform.h> >> #include <linux/acpi.h> >> #include <linux/regulator/consumer.h> >> +#include <linux/gpio/consumer.h> >> >> #define PCA953X_INPUT 0 >> #define PCA953X_OUTPUT 1 >> @@ -754,8 +755,18 @@ static int pca953x_probe(struct i2c_client *client, >> invert = pdata->invert; >> chip->names = pdata->names; >> } else { >> + struct gpio_desc *reset_gpio; >> + >> chip->gpio_start = -1; >> irq_base = 0; >> + >> + /* see if we need to de-assert a reset pin */ >> + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", >> + GPIOD_OUT_LOW); >> + if (IS_ERR(reset_gpio)) { >> + dev_err(&client->dev, "request for reset pin failed\n"); > I'm not confident that the error message is wanted here, you may consider either > to remove it or at least print it out if (PTR_ERR(reset_gpio) != -EPROBE_DEFER). no problem, I just removed it. Steve ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control 2017-01-02 21:07 ` [PATCH] gpio: " Steve Longerbeam 2017-01-03 23:37 ` Andy Shevchenko [not found] ` <1483391271-17304-2-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> @ 2017-01-04 13:22 ` Rob Herring 2017-01-10 19:21 ` Steve Longerbeam 2 siblings, 1 reply; 11+ messages in thread From: Rob Herring @ 2017-01-04 13:22 UTC (permalink / raw) To: Steve Longerbeam Cc: linus.walleij, gnurou, mark.rutland, linux-gpio, devicetree, linux-kernel, Steve Longerbeam On Mon, Jan 02, 2017 at 01:07:51PM -0800, Steve Longerbeam wrote: > Add optional reset-gpios pin control. If present, de-assert the > specified reset gpio pin to bring the chip out of reset. > > Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Alexandre Courbot <gnurou@gmail.com> > Cc: linux-gpio@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ > drivers/gpio/gpio-pca953x.c | 11 +++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > index 08dd15f..da54f4c 100644 > --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt > @@ -29,6 +29,10 @@ Required properties: > onsemi,pca9654 > exar,xra1202 > > +Optional properties: > + - reset-gpios: GPIO specification for the RESET input Need to specify active high or low. > + > + > Example: > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] gpio: pca953x: Add optional reset gpio control 2017-01-04 13:22 ` Rob Herring @ 2017-01-10 19:21 ` Steve Longerbeam 0 siblings, 0 replies; 11+ messages in thread From: Steve Longerbeam @ 2017-01-10 19:21 UTC (permalink / raw) To: Rob Herring Cc: linus.walleij-QSEj5FYQhm4dnm+yROfE0A, gnurou-Re5JQEeQqe8AvxtiuMwx3w, mark.rutland-5wv7dgnIgG8, linux-gpio-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Steve Longerbeam On 01/04/2017 05:22 AM, Rob Herring wrote: > On Mon, Jan 02, 2017 at 01:07:51PM -0800, Steve Longerbeam wrote: >> Add optional reset-gpios pin control. If present, de-assert the >> specified reset gpio pin to bring the chip out of reset. >> >> Signed-off-by: Steve Longerbeam <steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> >> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> >> Cc: Alexandre Courbot <gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> Cc: linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> --- >> Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 4 ++++ >> drivers/gpio/gpio-pca953x.c | 11 +++++++++++ >> 2 files changed, 15 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt >> index 08dd15f..da54f4c 100644 >> --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt >> +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt >> @@ -29,6 +29,10 @@ Required properties: >> onsemi,pca9654 >> exar,xra1202 >> >> +Optional properties: >> + - reset-gpios: GPIO specification for the RESET input > Need to specify active high or low. done (it's an active low signal). Steve -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-01-10 19:21 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-02 21:07 [PATCH] pca953x: Add optional reset gpio control Steve Longerbeam 2017-01-02 21:07 ` [PATCH] gpio: " Steve Longerbeam 2017-01-03 23:37 ` Andy Shevchenko [not found] ` <CAHp75VeCKPy4B51P_N9Bp03zPUbRodKzitc-n16ZRKJWcEF4fA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-01-04 10:20 ` Vladimir Zapolskiy [not found] ` <7bfce806-7670-0bf3-bdf2-00aaf68b5b11-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 2017-01-04 10:31 ` Andy Shevchenko 2017-01-10 19:10 ` Steve Longerbeam 2017-01-10 18:57 ` Steve Longerbeam [not found] ` <1483391271-17304-2-git-send-email-steve_longerbeam-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 2017-01-04 10:25 ` Vladimir Zapolskiy 2017-01-10 19:13 ` Steve Longerbeam 2017-01-04 13:22 ` Rob Herring 2017-01-10 19:21 ` Steve Longerbeam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).