All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high
@ 2017-05-23 14:47 Charles Keepax
  2017-05-23 14:47 ` [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs Charles Keepax
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Charles Keepax @ 2017-05-23 14:47 UTC (permalink / raw)
  To: linus.walleij-QSEj5FYQhm4dnm+yROfE0A
  Cc: lee.jones-QSEj5FYQhm4dnm+yROfE0A, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA

Commit 4c0facddb7d8 ("gpio: core: Decouple open drain/source flag with
active low/high") decoupled the open collector outputs from active
low/high but did not update the documentation.

Update the device tree documentation to correctly reflect this new
separation between the two concepts.

Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
---

New to the series.

Thanks,
Charles

 Documentation/devicetree/bindings/gpio/gpio.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 2209c16..bccb8623 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -74,11 +74,12 @@ GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller.
 Optional standard bitfield specifiers for the last cell:
 
 - Bit 0: 0 means active high, 1 means active low
-- Bit 1: 1 means single-ended wiring, see:
+- Bit 1: 0 mean push-pull wiring, see:
+           https://en.wikipedia.org/wiki/Push-pull_output
+         1 means single-ended wiring, see:
            https://en.wikipedia.org/wiki/Single-ended_triode
-	   When used with active-low, this means open drain/collector, see:
+- Bit 2: 0 means open-source, 1 means open drain, see:
            https://en.wikipedia.org/wiki/Open_collector
-	   When used with active-high, this means open source/emitter
 
 1.1) GPIO specifier best practices
 ----------------------------------
-- 
2.1.4

--
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 related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs
  2017-05-23 14:47 [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Charles Keepax
@ 2017-05-23 14:47 ` Charles Keepax
  2017-05-29  9:08   ` Linus Walleij
  2017-05-23 14:47 ` [PATCH v2 3/5] gpio: arizona: Add support for GPIOs that need to be maintained Charles Keepax
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Charles Keepax @ 2017-05-23 14:47 UTC (permalink / raw)
  To: linus.walleij
  Cc: lee.jones, robh+dt, mark.rutland, linux-gpio, devicetree,
	patches, frowand.list, ldewangan

Add new flags to allow users to specify that they are not concerned with
the status of GPIOs whilst in a sleep/low power state.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Rob Herring <robh@kernel.org>
---

Changes since v1:
 - Added much more core support for the SLEEP_MAY_LOOSE_VALUE flag
 - Moved dt-binding new defines down a few lines

Rob, I carried your Ack since I assume you only care about
the dt-bindings include, which has only had the previous
defines moved down a couple of lines. I hope that is ok.

Thanks,
Charles

 drivers/gpio/gpiolib-of.c       |  3 +++
 drivers/gpio/gpiolib.c          | 12 ++++++++++++
 drivers/gpio/gpiolib.h          |  1 +
 include/dt-bindings/gpio/gpio.h |  4 ++++
 include/linux/gpio/driver.h     |  3 +++
 include/linux/gpio/machine.h    |  2 ++
 include/linux/of_gpio.h         |  1 +
 7 files changed, 26 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index b13b7c7..e2abf0e 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -153,6 +153,9 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
 			*flags |= GPIO_OPEN_SOURCE;
 	}
 
+	if (of_flags & OF_GPIO_SLEEP_MAY_LOOSE_VALUE)
+		*flags |= GPIO_SLEEP_MAY_LOOSE_VALUE;
+
 	return desc;
 }
 
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5db4413..3cdddf4 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2869,6 +2869,16 @@ bool gpiochip_line_is_open_source(struct gpio_chip *chip, unsigned int offset)
 }
 EXPORT_SYMBOL_GPL(gpiochip_line_is_open_source);
 
+bool gpiochip_line_is_persistent(struct gpio_chip *chip, unsigned int offset)
+{
+	if (offset >= chip->ngpio)
+		return false;
+
+	return !test_bit(FLAG_SLEEP_MAY_LOOSE_VALUE,
+			 &chip->gpiodev->descs[offset].flags);
+}
+EXPORT_SYMBOL_GPL(gpiochip_line_is_persistent);
+
 /**
  * gpiod_get_raw_value_cansleep() - return a gpio's raw value
  * @desc: gpio whose value will be returned
@@ -3223,6 +3233,8 @@ static int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
 		set_bit(FLAG_OPEN_DRAIN, &desc->flags);
 	if (lflags & GPIO_OPEN_SOURCE)
 		set_bit(FLAG_OPEN_SOURCE, &desc->flags);
+	if (lflags & GPIO_SLEEP_MAY_LOOSE_VALUE)
+		set_bit(FLAG_SLEEP_MAY_LOOSE_VALUE, &desc->flags);
 
 	/* No particular flag request, return here... */
 	if (!(dflags & GPIOD_FLAGS_BIT_DIR_SET)) {
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 2495b7e..f74b8a7 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -190,6 +190,7 @@ struct gpio_desc {
 #define FLAG_OPEN_SOURCE 8	/* Gpio is open source type */
 #define FLAG_USED_AS_IRQ 9	/* GPIO is connected to an IRQ */
 #define FLAG_IS_HOGGED	11	/* GPIO is hogged */
+#define FLAG_SLEEP_MAY_LOOSE_VALUE 12	/* GPIO may loose value in sleep */
 
 	/* Connection label */
 	const char		*label;
diff --git a/include/dt-bindings/gpio/gpio.h b/include/dt-bindings/gpio/gpio.h
index b4f54da..c507458 100644
--- a/include/dt-bindings/gpio/gpio.h
+++ b/include/dt-bindings/gpio/gpio.h
@@ -28,4 +28,8 @@
 #define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
 #define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
 
+/* Bit 3 express GPIO suspend/resume persistence */
+#define GPIO_SLEEP_MAINTAIN_VALUE 0
+#define GPIO_SLEEP_MAY_LOOSE_VALUE 8
+
 #endif
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 3935828..af20369 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -213,6 +213,9 @@ bool gpiochip_line_is_irq(struct gpio_chip *chip, unsigned int offset);
 bool gpiochip_line_is_open_drain(struct gpio_chip *chip, unsigned int offset);
 bool gpiochip_line_is_open_source(struct gpio_chip *chip, unsigned int offset);
 
+/* Sleep persistence inquiry for drivers */
+bool gpiochip_line_is_persistent(struct gpio_chip *chip, unsigned int offset);
+
 /* get driver data */
 void *gpiochip_get_data(struct gpio_chip *chip);
 
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
index c0d712d..13adadf 100644
--- a/include/linux/gpio/machine.h
+++ b/include/linux/gpio/machine.h
@@ -9,6 +9,8 @@ enum gpio_lookup_flags {
 	GPIO_ACTIVE_LOW = (1 << 0),
 	GPIO_OPEN_DRAIN = (1 << 1),
 	GPIO_OPEN_SOURCE = (1 << 2),
+	GPIO_SLEEP_MAINTAIN_VALUE = (0 << 3),
+	GPIO_SLEEP_MAY_LOOSE_VALUE = (1 << 3),
 };
 
 /**
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 1e089d5..ca10f43 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -31,6 +31,7 @@ enum of_gpio_flags {
 	OF_GPIO_ACTIVE_LOW = 0x1,
 	OF_GPIO_SINGLE_ENDED = 0x2,
 	OF_GPIO_OPEN_DRAIN = 0x4,
+	OF_GPIO_SLEEP_MAY_LOOSE_VALUE = 0x8,
 };
 
 #ifdef CONFIG_OF_GPIO
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 3/5] gpio: arizona: Add support for GPIOs that need to be maintained
  2017-05-23 14:47 [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Charles Keepax
  2017-05-23 14:47 ` [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs Charles Keepax
@ 2017-05-23 14:47 ` Charles Keepax
       [not found]   ` <1495550852-3672-3-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
  2017-05-23 14:47 ` [PATCH v2 4/5] gpio: of: Add documentation of new sleep standard GPIO specifiers Charles Keepax
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Charles Keepax @ 2017-05-23 14:47 UTC (permalink / raw)
  To: linus.walleij
  Cc: lee.jones, robh+dt, mark.rutland, linux-gpio, devicetree,
	patches, frowand.list, ldewangan

The Arizona devices only maintain the state of output GPIOs whilst the
CODEC is active, this can cause issues if the CODEC suspends whilst
something is relying on the state of one of its GPIOs. However, in
many systems the CODEC GPIOs are used for audio related features
and thus the state of the GPIOs is unimportant whilst the CODEC is
suspended. Often keeping the CODEC resumed in such a system would
incur a power impact that is unacceptable.

Allow the user to select whether a GPIO output should keep the
CODEC resumed, by adding a flag through the second cell of the GPIO
specifier in device tree.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---

Changes since v1:
 - Use the new gpiolib features to determine if the pin is
   persistent or not.

Thanks,
Charles

 drivers/gpio/gpio-arizona.c | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index cd23fd7..d4e6ba0 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -33,9 +33,23 @@ static int arizona_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
 {
 	struct arizona_gpio *arizona_gpio = gpiochip_get_data(chip);
 	struct arizona *arizona = arizona_gpio->arizona;
+	bool persistent = gpiochip_line_is_persistent(chip, offset);
+	bool change;
+	int ret;
 
-	return regmap_update_bits(arizona->regmap, ARIZONA_GPIO1_CTRL + offset,
-				  ARIZONA_GPN_DIR, ARIZONA_GPN_DIR);
+	ret = regmap_update_bits_check(arizona->regmap,
+				       ARIZONA_GPIO1_CTRL + offset,
+				       ARIZONA_GPN_DIR, ARIZONA_GPN_DIR,
+				       &change);
+	if (ret < 0)
+		return ret;
+
+	if (change && persistent) {
+		pm_runtime_mark_last_busy(chip->parent);
+		pm_runtime_put_autosuspend(chip->parent);
+	}
+
+	return 0;
 }
 
 static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
@@ -85,6 +99,21 @@ static int arizona_gpio_direction_out(struct gpio_chip *chip,
 {
 	struct arizona_gpio *arizona_gpio = gpiochip_get_data(chip);
 	struct arizona *arizona = arizona_gpio->arizona;
+	bool persistent = gpiochip_line_is_persistent(chip, offset);
+	unsigned int val;
+	int ret;
+
+	ret = regmap_read(arizona->regmap, ARIZONA_GPIO1_CTRL + offset, &val);
+	if (ret < 0)
+		return ret;
+
+	if ((val & ARIZONA_GPN_DIR) && persistent) {
+		ret = pm_runtime_get_sync(chip->parent);
+		if (ret < 0) {
+			dev_err(chip->parent, "Failed to resume: %d\n", ret);
+			return ret;
+		}
+	}
 
 	if (value)
 		value = ARIZONA_GPN_LVL;
@@ -158,6 +187,8 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 	else
 		arizona_gpio->gpio_chip.base = -1;
 
+	pm_runtime_enable(&pdev->dev);
+
 	ret = devm_gpiochip_add_data(&pdev->dev, &arizona_gpio->gpio_chip,
 				     arizona_gpio);
 	if (ret < 0) {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 4/5] gpio: of: Add documentation of new sleep standard GPIO specifiers
  2017-05-23 14:47 [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Charles Keepax
  2017-05-23 14:47 ` [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs Charles Keepax
  2017-05-23 14:47 ` [PATCH v2 3/5] gpio: arizona: Add support for GPIOs that need to be maintained Charles Keepax
@ 2017-05-23 14:47 ` Charles Keepax
  2017-05-24  8:42   ` Laxman Dewangan
       [not found]   ` <1495550852-3672-4-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
       [not found] ` <1495550852-3672-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 14+ messages in thread
From: Charles Keepax @ 2017-05-23 14:47 UTC (permalink / raw)
  To: linus.walleij
  Cc: lee.jones, robh+dt, mark.rutland, linux-gpio, devicetree,
	patches, frowand.list, ldewangan

Add documentation of new GPIO specifiers indicating if the state of an
output pin should be maintained during sleep/low-power mode.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---

New to the series.

Thanks,
Charles

 Documentation/devicetree/bindings/gpio/gpio.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index bccb8623..802402f 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -80,6 +80,8 @@ Optional standard bitfield specifiers for the last cell:
            https://en.wikipedia.org/wiki/Single-ended_triode
 - Bit 2: 0 means open-source, 1 means open drain, see:
            https://en.wikipedia.org/wiki/Open_collector
+- Bit 3: 0 means the output should be maintained during sleep/low-power mode
+         1 means the output state can be lost during sleep/low-power mode
 
 1.1) GPIO specifier best practices
 ----------------------------------
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 5/5] mfd: arizona: Update GPIO binding for newly supported specifiers
       [not found] ` <1495550852-3672-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2017-05-23 14:47   ` Charles Keepax
  2017-05-24  8:35     ` Lee Jones
       [not found]     ` <1495550852-3672-5-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Charles Keepax @ 2017-05-23 14:47 UTC (permalink / raw)
  To: linus.walleij-QSEj5FYQhm4dnm+yROfE0A
  Cc: lee.jones-QSEj5FYQhm4dnm+yROfE0A, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA

Link to the generic GPIO specifier bindings now that the second cell of
the binding has some support in the driver.

Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
---

Changes since v1:
 - Now just points at the standard gpio binding stuff

Thanks,
Charles

 Documentation/devicetree/bindings/mfd/arizona.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index 8f2e282..b37bdde 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -30,7 +30,8 @@ Required properties:
 
   - gpio-controller : Indicates this device is a GPIO controller.
   - #gpio-cells : Must be 2. The first cell is the pin number and the
-    second cell is used to specify optional parameters (currently unused).
+    second cell is used to specify optional parameters, see ../gpio/gpio.txt
+    for details.
 
   - AVDD-supply, DBVDD1-supply, CPVDD-supply : Power supplies for the device,
     as covered in Documentation/devicetree/bindings/regulator/regulator.txt
-- 
2.1.4

--
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 related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 5/5] mfd: arizona: Update GPIO binding for newly supported specifiers
  2017-05-23 14:47   ` [PATCH v2 5/5] mfd: arizona: Update GPIO binding for newly supported specifiers Charles Keepax
@ 2017-05-24  8:35     ` Lee Jones
  2017-05-29  9:11       ` Linus Walleij
       [not found]     ` <1495550852-3672-5-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Lee Jones @ 2017-05-24  8:35 UTC (permalink / raw)
  To: Charles Keepax
  Cc: linus.walleij, robh+dt, mark.rutland, linux-gpio, devicetree,
	patches, frowand.list, ldewangan

On Tue, 23 May 2017, Charles Keepax wrote:

> Link to the generic GPIO specifier bindings now that the second cell of
> the binding has some support in the driver.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> 
> Changes since v1:
>  - Now just points at the standard gpio binding stuff
> 
> Thanks,
> Charles
> 
>  Documentation/devicetree/bindings/mfd/arizona.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

I'll take this if/when the GPIO changes are merged.

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
  
> diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
> index 8f2e282..b37bdde 100644
> --- a/Documentation/devicetree/bindings/mfd/arizona.txt
> +++ b/Documentation/devicetree/bindings/mfd/arizona.txt
> @@ -30,7 +30,8 @@ Required properties:
>  
>    - gpio-controller : Indicates this device is a GPIO controller.
>    - #gpio-cells : Must be 2. The first cell is the pin number and the
> -    second cell is used to specify optional parameters (currently unused).
> +    second cell is used to specify optional parameters, see ../gpio/gpio.txt
> +    for details.
>  
>    - AVDD-supply, DBVDD1-supply, CPVDD-supply : Power supplies for the device,
>      as covered in Documentation/devicetree/bindings/regulator/regulator.txt

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high
  2017-05-23 14:47 [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Charles Keepax
                   ` (3 preceding siblings ...)
       [not found] ` <1495550852-3672-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2017-05-24  8:40 ` Laxman Dewangan
  2017-05-29  9:06 ` Linus Walleij
  5 siblings, 0 replies; 14+ messages in thread
From: Laxman Dewangan @ 2017-05-24  8:40 UTC (permalink / raw)
  To: Charles Keepax, linus.walleij
  Cc: lee.jones, robh+dt, mark.rutland, linux-gpio, devicetree,
	patches, frowand.list


On Tuesday 23 May 2017 08:17 PM, Charles Keepax wrote:
> Commit 4c0facddb7d8 ("gpio: core: Decouple open drain/source flag with
> active low/high") decoupled the open collector outputs from active
> low/high but did not update the documentation.
>
> Update the device tree documentation to correctly reflect this new
> separation between the two concepts.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

Thanks,
Laxman

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 4/5] gpio: of: Add documentation of new sleep standard GPIO specifiers
  2017-05-23 14:47 ` [PATCH v2 4/5] gpio: of: Add documentation of new sleep standard GPIO specifiers Charles Keepax
@ 2017-05-24  8:42   ` Laxman Dewangan
       [not found]   ` <1495550852-3672-4-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Laxman Dewangan @ 2017-05-24  8:42 UTC (permalink / raw)
  To: Charles Keepax, linus.walleij
  Cc: lee.jones, robh+dt, mark.rutland, linux-gpio, devicetree,
	patches, frowand.list


On Tuesday 23 May 2017 08:17 PM, Charles Keepax wrote:
> Add documentation of new GPIO specifiers indicating if the state of an
> output pin should be maintained during sleep/low-power mode.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

Thanks,
Laxman

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high
  2017-05-23 14:47 [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Charles Keepax
                   ` (4 preceding siblings ...)
  2017-05-24  8:40 ` [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Laxman Dewangan
@ 2017-05-29  9:06 ` Linus Walleij
  5 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2017-05-29  9:06 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Lee Jones, Rob Herring, Mark Rutland, linux-gpio, devicetree,
	open list:WOLFSON MICROELECTRONICS DRIVERS, Frank Rowand,
	Laxman Dewangan

On Tue, May 23, 2017 at 4:47 PM, Charles Keepax
<ckeepax@opensource.wolfsonmicro.com> wrote:

> Commit 4c0facddb7d8 ("gpio: core: Decouple open drain/source flag with
> active low/high") decoupled the open collector outputs from active
> low/high but did not update the documentation.
>
> Update the device tree documentation to correctly reflect this new
> separation between the two concepts.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Awesome, patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs
  2017-05-23 14:47 ` [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs Charles Keepax
@ 2017-05-29  9:08   ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2017-05-29  9:08 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Lee Jones, Rob Herring, Mark Rutland, linux-gpio, devicetree,
	open list:WOLFSON MICROELECTRONICS DRIVERS, Frank Rowand,
	Laxman Dewangan

On Tue, May 23, 2017 at 4:47 PM, Charles Keepax
<ckeepax@opensource.wolfsonmicro.com> wrote:

> Add new flags to allow users to specify that they are not concerned with
> the status of GPIOs whilst in a sleep/low power state.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> Acked-by: Rob Herring <robh@kernel.org>

Yes! Exactly like this, awesome job.

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 3/5] gpio: arizona: Add support for GPIOs that need to be maintained
       [not found]   ` <1495550852-3672-3-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2017-05-29  9:09     ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2017-05-29  9:09 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Lee Jones, Rob Herring, Mark Rutland,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	open list:WOLFSON MICROELECTRONICS DRIVERS, Frank Rowand,
	Laxman Dewangan

On Tue, May 23, 2017 at 4:47 PM, Charles Keepax
<ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> wrote:

> The Arizona devices only maintain the state of output GPIOs whilst the
> CODEC is active, this can cause issues if the CODEC suspends whilst
> something is relying on the state of one of its GPIOs. However, in
> many systems the CODEC GPIOs are used for audio related features
> and thus the state of the GPIOs is unimportant whilst the CODEC is
> suspended. Often keeping the CODEC resumed in such a system would
> incur a power impact that is unacceptable.
>
> Allow the user to select whether a GPIO output should keep the
> CODEC resumed, by adding a flag through the second cell of the GPIO
> specifier in device tree.
>
> Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
> ---
>
> Changes since v1:
>  - Use the new gpiolib features to determine if the pin is
>    persistent or not.

Patch applied!

Yours,
Linus Walleij
--
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] 14+ messages in thread

* Re: [PATCH v2 4/5] gpio: of: Add documentation of new sleep standard GPIO specifiers
       [not found]   ` <1495550852-3672-4-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2017-05-29  9:10     ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2017-05-29  9:10 UTC (permalink / raw)
  To: Charles Keepax
  Cc: Lee Jones, Rob Herring, Mark Rutland,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	open list:WOLFSON MICROELECTRONICS DRIVERS, Frank Rowand,
	Laxman Dewangan

On Tue, May 23, 2017 at 4:47 PM, Charles Keepax
<ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org> wrote:

> Add documentation of new GPIO specifiers indicating if the state of an
> output pin should be maintained during sleep/low-power mode.
>
> Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

Patch applied with Laxman's ACK.

Yours,
Linus Walleij
--
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] 14+ messages in thread

* Re: [PATCH v2 5/5] mfd: arizona: Update GPIO binding for newly supported specifiers
  2017-05-24  8:35     ` Lee Jones
@ 2017-05-29  9:11       ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2017-05-29  9:11 UTC (permalink / raw)
  To: Lee Jones
  Cc: Charles Keepax, Rob Herring, Mark Rutland,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	open list:WOLFSON MICROELECTRONICS DRIVERS, Frank Rowand,
	Laxman Dewangan

On Wed, May 24, 2017 at 10:35 AM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> On Tue, 23 May 2017, Charles Keepax wrote:
>
>> Link to the generic GPIO specifier bindings now that the second cell of
>> the binding has some support in the driver.
>>
>> Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
>> ---
>>
>> Changes since v1:
>>  - Now just points at the standard gpio binding stuff
>>
>> Thanks,
>> Charles
>>
>>  Documentation/devicetree/bindings/mfd/arizona.txt | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> I'll take this if/when the GPIO changes are merged.
>
> For my own reference:
>   Acked-for-MFD-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

I merged them today.
Reviewed-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Yours,
Linus Walleij
--
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] 14+ messages in thread

* Re: [PATCH v2 5/5] mfd: arizona: Update GPIO binding for newly supported specifiers
       [not found]     ` <1495550852-3672-5-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
@ 2017-05-30  7:17       ` Lee Jones
  0 siblings, 0 replies; 14+ messages in thread
From: Lee Jones @ 2017-05-30  7:17 UTC (permalink / raw)
  To: Charles Keepax
  Cc: linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	ldewangan-DDmLM1+adcrQT0dZR+AlfA

On Tue, 23 May 2017, Charles Keepax wrote:

> Link to the generic GPIO specifier bindings now that the second cell of
> the binding has some support in the driver.
> 
> Signed-off-by: Charles Keepax <ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
> ---
> 
> Changes since v1:
>  - Now just points at the standard gpio binding stuff
> 
> Thanks,
> Charles
> 
>  Documentation/devicetree/bindings/mfd/arizona.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

> diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
> index 8f2e282..b37bdde 100644
> --- a/Documentation/devicetree/bindings/mfd/arizona.txt
> +++ b/Documentation/devicetree/bindings/mfd/arizona.txt
> @@ -30,7 +30,8 @@ Required properties:
>  
>    - gpio-controller : Indicates this device is a GPIO controller.
>    - #gpio-cells : Must be 2. The first cell is the pin number and the
> -    second cell is used to specify optional parameters (currently unused).
> +    second cell is used to specify optional parameters, see ../gpio/gpio.txt
> +    for details.
>  
>    - AVDD-supply, DBVDD1-supply, CPVDD-supply : Power supplies for the device,
>      as covered in Documentation/devicetree/bindings/regulator/regulator.txt

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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] 14+ messages in thread

end of thread, other threads:[~2017-05-30  7:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23 14:47 [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Charles Keepax
2017-05-23 14:47 ` [PATCH v2 2/5] gpio: Add new flags to control sleep status of GPIOs Charles Keepax
2017-05-29  9:08   ` Linus Walleij
2017-05-23 14:47 ` [PATCH v2 3/5] gpio: arizona: Add support for GPIOs that need to be maintained Charles Keepax
     [not found]   ` <1495550852-3672-3-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-05-29  9:09     ` Linus Walleij
2017-05-23 14:47 ` [PATCH v2 4/5] gpio: of: Add documentation of new sleep standard GPIO specifiers Charles Keepax
2017-05-24  8:42   ` Laxman Dewangan
     [not found]   ` <1495550852-3672-4-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-05-29  9:10     ` Linus Walleij
     [not found] ` <1495550852-3672-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-05-23 14:47   ` [PATCH v2 5/5] mfd: arizona: Update GPIO binding for newly supported specifiers Charles Keepax
2017-05-24  8:35     ` Lee Jones
2017-05-29  9:11       ` Linus Walleij
     [not found]     ` <1495550852-3672-5-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-05-30  7:17       ` Lee Jones
2017-05-24  8:40 ` [PATCH v2 1/5] gpio: of: Reflect decoupling of open collector and active low/high Laxman Dewangan
2017-05-29  9:06 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.