All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/3] Open drain/open source support from gpio library
@ 2012-02-17 14:56 ` Laxman Dewangan
  0 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie, grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel
  Cc: linux-tegra, ldewangan

This patch is as per discussion on the patch
[PATCH V1] regulator: fixed: Support for open-drain gpio 
where it was suggested to push the handling of open drain gpios
into the gpio libray.

This is series of patches  to add support of the open drain and open
source gpios in standard gpio library.
- Added GPIOF_OPEN_DRAIN flag so that client can request the
  gpio with this flag. Handle open drain gpio configuration properly.
- Added GPIOF_OPEN_SOURCE flag so that client can request the
  gpio with this flag. Handle open source gpio configuration properly.
- Gpio documentation changes to have support for open-drain.

From the patch series of V1, it is discussed to
- remove the sysfs interface supportsi for open drain.
- Added open source support as a new change.

Laxman Dewangan (3):
  Documentation: gpio: Add details of open-drain/source configuration
  gpio: gpiolib: Support for open drain/collector gpios
  gpio: gpiolib: Support for open source/emitter gpios

 Documentation/gpio.txt |   17 +++++++++-
 drivers/gpio/gpiolib.c |   83 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/gpio.h   |    6 +++
 3 files changed, 102 insertions(+), 4 deletions(-)


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

* [PATCH V2 0/3] Open drain/open source support from gpio library
@ 2012-02-17 14:56 ` Laxman Dewangan
  0 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie, grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel
  Cc: linux-tegra, ldewangan

This patch is as per discussion on the patch
[PATCH V1] regulator: fixed: Support for open-drain gpio 
where it was suggested to push the handling of open drain gpios
into the gpio libray.

This is series of patches  to add support of the open drain and open
source gpios in standard gpio library.
- Added GPIOF_OPEN_DRAIN flag so that client can request the
  gpio with this flag. Handle open drain gpio configuration properly.
- Added GPIOF_OPEN_SOURCE flag so that client can request the
  gpio with this flag. Handle open source gpio configuration properly.
- Gpio documentation changes to have support for open-drain.

>From the patch series of V1, it is discussed to
- remove the sysfs interface supportsi for open drain.
- Added open source support as a new change.

Laxman Dewangan (3):
  Documentation: gpio: Add details of open-drain/source configuration
  gpio: gpiolib: Support for open drain/collector gpios
  gpio: gpiolib: Support for open source/emitter gpios

 Documentation/gpio.txt |   17 +++++++++-
 drivers/gpio/gpiolib.c |   83 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/gpio.h   |    6 +++
 3 files changed, 102 insertions(+), 4 deletions(-)


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

* [PATCH V2 0/3] Open drain/open source support from gpio library
  2012-02-17 14:56 ` Laxman Dewangan
@ 2012-02-17 14:56     ` Laxman Dewangan
  -1 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	linus.walleij-0IS4wlFg1OjSUeElwK9/Pw,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, ldewangan-DDmLM1+adcrQT0dZR+AlfA

This patch is as per discussion on the patch
[PATCH V1] regulator: fixed: Support for open-drain gpio 
where it was suggested to push the handling of open drain gpios
into the gpio libray.

This is series of patches  to add support of the open drain and open
source gpios in standard gpio library.
- Added GPIOF_OPEN_DRAIN flag so that client can request the
  gpio with this flag. Handle open drain gpio configuration properly.
- Added GPIOF_OPEN_SOURCE flag so that client can request the
  gpio with this flag. Handle open source gpio configuration properly.
- Gpio documentation changes to have support for open-drain.

From the patch series of V1, it is discussed to
- remove the sysfs interface supportsi for open drain.
- Added open source support as a new change.

Laxman Dewangan (3):
  Documentation: gpio: Add details of open-drain/source configuration
  gpio: gpiolib: Support for open drain/collector gpios
  gpio: gpiolib: Support for open source/emitter gpios

 Documentation/gpio.txt |   17 +++++++++-
 drivers/gpio/gpiolib.c |   83 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/gpio.h   |    6 +++
 3 files changed, 102 insertions(+), 4 deletions(-)

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

* [PATCH V2 0/3] Open drain/open source support from gpio library
@ 2012-02-17 14:56     ` Laxman Dewangan
  0 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie, grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel
  Cc: linux-tegra, ldewangan

This patch is as per discussion on the patch
[PATCH V1] regulator: fixed: Support for open-drain gpio 
where it was suggested to push the handling of open drain gpios
into the gpio libray.

This is series of patches  to add support of the open drain and open
source gpios in standard gpio library.
- Added GPIOF_OPEN_DRAIN flag so that client can request the
  gpio with this flag. Handle open drain gpio configuration properly.
- Added GPIOF_OPEN_SOURCE flag so that client can request the
  gpio with this flag. Handle open source gpio configuration properly.
- Gpio documentation changes to have support for open-drain.

>From the patch series of V1, it is discussed to
- remove the sysfs interface supportsi for open drain.
- Added open source support as a new change.

Laxman Dewangan (3):
  Documentation: gpio: Add details of open-drain/source configuration
  gpio: gpiolib: Support for open drain/collector gpios
  gpio: gpiolib: Support for open source/emitter gpios

 Documentation/gpio.txt |   17 +++++++++-
 drivers/gpio/gpiolib.c |   83 ++++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/gpio.h   |    6 +++
 3 files changed, 102 insertions(+), 4 deletions(-)


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

* [PATCH V2 1/3] Documentation: gpio: Add details of open-drain/source configuration
  2012-02-17 14:56 ` Laxman Dewangan
  (?)
  (?)
@ 2012-02-17 14:56 ` Laxman Dewangan
  -1 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie, grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel
  Cc: linux-tegra, ldewangan

Adding details of open drain(open collector) and open source
(open emitter) configuration of the gpio so that client can
set the pin as open drain at the time of gpio request.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 Documentation/gpio.txt |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
index 792faa3..f783e7f 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
@@ -302,6 +302,8 @@ where 'flags' is currently defined to specify the following properties:
 
 	* GPIOF_INIT_LOW	- as output, set initial level to LOW
 	* GPIOF_INIT_HIGH	- as output, set initial level to HIGH
+	* GPIOF_OPEN_DRAIN	- gpio pin is open drain type.
+	* GPIOF_OPEN_SOURCE	- gpio pin is open source type.
 
 since GPIOF_INIT_* are only valid when configured as output, so group valid
 combinations as:
@@ -310,8 +312,19 @@ combinations as:
 	* GPIOF_OUT_INIT_LOW	- configured as output, initial level LOW
 	* GPIOF_OUT_INIT_HIGH	- configured as output, initial level HIGH
 
-In the future, these flags can be extended to support more properties such
-as open-drain status.
+When setting the flag as GPIOF_OPEN_DRAIN then it will assume that pins is
+open drain type. Such pins will not be driven to 1 in output mode. It is
+require to connect pull-up on such pins. By enabling this flag, gpio lib will
+make the direction to input when it is asked to set value of 1 in output mode
+to make the pin HIGH. The pin is make to LOW by driving value 0 in output mode.
+
+When setting the flag as GPIOF_OPEN_SOURCE then it will assume that pins is
+open source type. Such pins will not be driven to 0 in output mode. It is
+require to connect pull-down on such pin. By enabling this flag, gpio lib will
+make the direction to input when it is asked to set value of 0 in output mode
+to make the pin LOW. The pin is make to HIGH by driving value 1 in output mode.
+
+In the future, these flags can be extended to support more properties.
 
 Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is
 introduced to encapsulate all three fields as:
-- 
1.7.1.1

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

* [PATCH V2 2/3] gpio: gpiolib: Support for open drain/collector gpios
  2012-02-17 14:56 ` Laxman Dewangan
                   ` (2 preceding siblings ...)
  (?)
@ 2012-02-17 14:56 ` Laxman Dewangan
       [not found]   ` <1329490582-22107-4-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  -1 siblings, 1 reply; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie, grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel
  Cc: linux-tegra, ldewangan

Adding support for the open drain gpio on which client
can specify the open drain property through GPIO flag
GPIOF_OPEN_DRAIN at the time of gpio request.
The open drain pins are normally pulled high and it
cannot be driven to output with value of 1 and so
when client request for setting the pin to HIGH, the
gpio will be set to input direction to make pin in tristate
and hence PULL-UP on pins will make the state to HIGH.
The open drain pin can be driven to LOW by setting output
with value of 0.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpiolib.c |   44 ++++++++++++++++++++++++++++++++++++++++++--
 include/linux/gpio.h   |    3 +++
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 17fdf4b..9940777 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -58,6 +58,7 @@ struct gpio_desc {
 #define FLAG_TRIG_FALL	5	/* trigger on falling edge */
 #define FLAG_TRIG_RISE	6	/* trigger on rising edge */
 #define FLAG_ACTIVE_LOW	7	/* sysfs value has active low */
+#define FLAG_OPEN_DRAIN	8	/* Gpio is open drain type */
 
 #define ID_SHIFT	16	/* add new flags before this one */
 
@@ -1261,6 +1262,7 @@ void gpio_free(unsigned gpio)
 		module_put(desc->chip->owner);
 		clear_bit(FLAG_ACTIVE_LOW, &desc->flags);
 		clear_bit(FLAG_REQUESTED, &desc->flags);
+		clear_bit(FLAG_OPEN_DRAIN, &desc->flags);
 	} else
 		WARN_ON(extra_checks);
 
@@ -1282,6 +1284,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
 	if (err)
 		return err;
 
+	if (flags & GPIOF_OPEN_DRAIN)
+		set_bit(FLAG_OPEN_DRAIN, &gpio_desc[gpio].flags);
+
 	if (flags & GPIOF_DIR_IN)
 		err = gpio_direction_input(gpio);
 	else
@@ -1431,6 +1436,10 @@ int gpio_direction_output(unsigned gpio, int value)
 	struct gpio_desc	*desc = &gpio_desc[gpio];
 	int			status = -EINVAL;
 
+	/* Open drain pin should not be driven to 1 */
+	if (value && test_bit(FLAG_OPEN_DRAIN,  &desc->flags))
+		return gpio_direction_input(gpio);
+
 	spin_lock_irqsave(&gpio_lock, flags);
 
 	if (!gpio_is_valid(gpio))
@@ -1567,6 +1576,31 @@ int __gpio_get_value(unsigned gpio)
 }
 EXPORT_SYMBOL_GPL(__gpio_get_value);
 
+/*
+ *  _gpio_set_open_drain_value() - Set the open drain gpio's value.
+ * @gpio: Gpio whose state need to be set.
+ * @chip: Gpio chip.
+ * @value: Non-zero for setting it HIGH otherise it will set to LOW.
+ */
+static void _gpio_set_open_drain_value(unsigned gpio,
+			struct gpio_chip *chip, int value)
+{
+	int err = 0;
+	if (value) {
+		err = chip->direction_input(chip, gpio - chip->base);
+		if (!err)
+			clear_bit(FLAG_IS_OUT, &gpio_desc[gpio].flags);
+	} else {
+		err = chip->direction_output(chip, gpio - chip->base, 0);
+		if (!err)
+			set_bit(FLAG_IS_OUT, &gpio_desc[gpio].flags);
+	}
+	trace_gpio_direction(gpio, value, err);
+	if (err < 0)
+		pr_err("%s: Error in set_value for open drain gpio%d err %d\n",
+					__func__, gpio, err);
+}
+
 /**
  * __gpio_set_value() - assign a gpio's value
  * @gpio: gpio whose value will be assigned
@@ -1583,7 +1617,10 @@ void __gpio_set_value(unsigned gpio, int value)
 	chip = gpio_to_chip(gpio);
 	WARN_ON(chip->can_sleep);
 	trace_gpio_value(gpio, 0, value);
-	chip->set(chip, gpio - chip->base, value);
+	if (test_bit(FLAG_OPEN_DRAIN,  &gpio_desc[gpio].flags))
+		_gpio_set_open_drain_value(gpio, chip, value);
+	else
+		chip->set(chip, gpio - chip->base, value);
 }
 EXPORT_SYMBOL_GPL(__gpio_set_value);
 
@@ -1650,7 +1687,10 @@ void gpio_set_value_cansleep(unsigned gpio, int value)
 	might_sleep_if(extra_checks);
 	chip = gpio_to_chip(gpio);
 	trace_gpio_value(gpio, 0, value);
-	chip->set(chip, gpio - chip->base, value);
+	if (test_bit(FLAG_OPEN_DRAIN,  &gpio_desc[gpio].flags))
+		_gpio_set_open_drain_value(gpio, chip, value);
+	else
+		chip->set(chip, gpio - chip->base, value);
 }
 EXPORT_SYMBOL_GPL(gpio_set_value_cansleep);
 
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 38ac48b..66a5b2e 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -14,6 +14,9 @@
 #define GPIOF_OUT_INIT_LOW	(GPIOF_DIR_OUT | GPIOF_INIT_LOW)
 #define GPIOF_OUT_INIT_HIGH	(GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
 
+/* Gpio pin is open drain */
+#define GPIOF_OPEN_DRAIN	(1 << 2)
+
 /**
  * struct gpio - a structure describing a GPIO with configuration
  * @gpio:	the GPIO number
-- 
1.7.1.1

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

* [PATCH V2 3/3] gpio: gpiolib: Support for open source/emitter gpios
  2012-02-17 14:56 ` Laxman Dewangan
                   ` (3 preceding siblings ...)
  (?)
@ 2012-02-17 14:56 ` Laxman Dewangan
       [not found]   ` <1329490582-22107-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  -1 siblings, 1 reply; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-17 14:56 UTC (permalink / raw)
  To: broonie, grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel
  Cc: linux-tegra, ldewangan

Adding support for the open source gpio on which client
can specify the open source property through GPIO flag
GPIOF_OPEN_SOURCE at the time of gpio request.
The open source pins are normally pulled low and it
cannot be driven to output with value of 0 and so
when client request for setting the pin to LOW, the
gpio will be set to input direction to make pin in tristate
and hence PULL-DOWN on pins will make the state to LOW.
The open source pin can be driven to HIGH by setting output
with value of 1.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/gpio/gpiolib.c |   39 +++++++++++++++++++++++++++++++++++++++
 include/linux/gpio.h   |    3 +++
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 9940777..3b089ef 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -59,6 +59,7 @@ struct gpio_desc {
 #define FLAG_TRIG_RISE	6	/* trigger on rising edge */
 #define FLAG_ACTIVE_LOW	7	/* sysfs value has active low */
 #define FLAG_OPEN_DRAIN	8	/* Gpio is open drain type */
+#define FLAG_OPEN_SOURCE 9	/* Gpio is open source type */
 
 #define ID_SHIFT	16	/* add new flags before this one */
 
@@ -1263,6 +1264,7 @@ void gpio_free(unsigned gpio)
 		clear_bit(FLAG_ACTIVE_LOW, &desc->flags);
 		clear_bit(FLAG_REQUESTED, &desc->flags);
 		clear_bit(FLAG_OPEN_DRAIN, &desc->flags);
+		clear_bit(FLAG_OPEN_SOURCE, &desc->flags);
 	} else
 		WARN_ON(extra_checks);
 
@@ -1287,6 +1289,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
 	if (flags & GPIOF_OPEN_DRAIN)
 		set_bit(FLAG_OPEN_DRAIN, &gpio_desc[gpio].flags);
 
+	if (flags & GPIOF_OPEN_SOURCE)
+		set_bit(FLAG_OPEN_SOURCE, &gpio_desc[gpio].flags);
+
 	if (flags & GPIOF_DIR_IN)
 		err = gpio_direction_input(gpio);
 	else
@@ -1440,6 +1445,10 @@ int gpio_direction_output(unsigned gpio, int value)
 	if (value && test_bit(FLAG_OPEN_DRAIN,  &desc->flags))
 		return gpio_direction_input(gpio);
 
+	/* Open source pin should not be driven to 0 */
+	if (!value && test_bit(FLAG_OPEN_SOURCE,  &desc->flags))
+		return gpio_direction_input(gpio);
+
 	spin_lock_irqsave(&gpio_lock, flags);
 
 	if (!gpio_is_valid(gpio))
@@ -1601,6 +1610,32 @@ static void _gpio_set_open_drain_value(unsigned gpio,
 					__func__, gpio, err);
 }
 
+/*
+ *  _gpio_set_open_source() - Set the open source gpio's value.
+ * @gpio: Gpio whose state need to be set.
+ * @chip: Gpio chip.
+ * @value: Non-zero for setting it HIGH otherise it will set to LOW.
+ */
+static void _gpio_set_open_source_value(unsigned gpio,
+			struct gpio_chip *chip, int value)
+{
+	int err = 0;
+	if (value) {
+		err = chip->direction_output(chip, gpio - chip->base, 1);
+		if (!err)
+			set_bit(FLAG_IS_OUT, &gpio_desc[gpio].flags);
+	} else {
+		err = chip->direction_input(chip, gpio - chip->base);
+		if (!err)
+			clear_bit(FLAG_IS_OUT, &gpio_desc[gpio].flags);
+	}
+	trace_gpio_direction(gpio, !value, err);
+	if (err < 0)
+		pr_err("%s: Error in set_value for open source gpio%d err %d\n",
+					__func__, gpio, err);
+}
+
+
 /**
  * __gpio_set_value() - assign a gpio's value
  * @gpio: gpio whose value will be assigned
@@ -1619,6 +1654,8 @@ void __gpio_set_value(unsigned gpio, int value)
 	trace_gpio_value(gpio, 0, value);
 	if (test_bit(FLAG_OPEN_DRAIN,  &gpio_desc[gpio].flags))
 		_gpio_set_open_drain_value(gpio, chip, value);
+	else if (test_bit(FLAG_OPEN_SOURCE,  &gpio_desc[gpio].flags))
+		_gpio_set_open_source_value(gpio, chip, value);
 	else
 		chip->set(chip, gpio - chip->base, value);
 }
@@ -1689,6 +1726,8 @@ void gpio_set_value_cansleep(unsigned gpio, int value)
 	trace_gpio_value(gpio, 0, value);
 	if (test_bit(FLAG_OPEN_DRAIN,  &gpio_desc[gpio].flags))
 		_gpio_set_open_drain_value(gpio, chip, value);
+	else if (test_bit(FLAG_OPEN_SOURCE,  &gpio_desc[gpio].flags))
+		_gpio_set_open_source_value(gpio, chip, value);
 	else
 		chip->set(chip, gpio - chip->base, value);
 }
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 66a5b2e..67851bb 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -17,6 +17,9 @@
 /* Gpio pin is open drain */
 #define GPIOF_OPEN_DRAIN	(1 << 2)
 
+/* Gpio pin is open source */
+#define GPIOF_OPEN_SOURCE	(1 << 3)
+
 /**
  * struct gpio - a structure describing a GPIO with configuration
  * @gpio:	the GPIO number
-- 
1.7.1.1

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

* Re: [PATCH V2 3/3] gpio: gpiolib: Support for open source/emitter gpios
  2012-02-17 14:56 ` [PATCH V2 3/3] gpio: gpiolib: Support for open source/emitter gpios Laxman Dewangan
@ 2012-02-17 16:30       ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2012-02-17 16:30 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	linus.walleij-0IS4wlFg1OjSUeElwK9/Pw,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

On Fri, Feb 17, 2012 at 08:26:22PM +0530, Laxman Dewangan wrote:
> Adding support for the open source gpio on which client
> can specify the open source property through GPIO flag

It's a perfectly sensible name but for a minute I thought you were
talking about software licensing here :)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH V2 3/3] gpio: gpiolib: Support for open source/emitter gpios
@ 2012-02-17 16:30       ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2012-02-17 16:30 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel,
	linux-tegra

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

On Fri, Feb 17, 2012 at 08:26:22PM +0530, Laxman Dewangan wrote:
> Adding support for the open source gpio on which client
> can specify the open source property through GPIO flag

It's a perfectly sensible name but for a minute I thought you were
talking about software licensing here :)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH V2 2/3] gpio: gpiolib: Support for open drain/collector gpios
  2012-02-17 14:56 ` [PATCH V2 2/3] gpio: gpiolib: Support for open drain/collector gpios Laxman Dewangan
@ 2012-02-17 16:37       ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2012-02-17 16:37 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	linus.walleij-0IS4wlFg1OjSUeElwK9/Pw,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

On Fri, Feb 17, 2012 at 08:26:21PM +0530, Laxman Dewangan wrote:
> Adding support for the open drain gpio on which client
> can specify the open drain property through GPIO flag
> GPIOF_OPEN_DRAIN at the time of gpio request.
> The open drain pins are normally pulled high and it
> cannot be driven to output with value of 1 and so
> when client request for setting the pin to HIGH, the
> gpio will be set to input direction to make pin in tristate
> and hence PULL-UP on pins will make the state to HIGH.
> The open drain pin can be driven to LOW by setting output
> with value of 0.

Reviwed-by: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH V2 2/3] gpio: gpiolib: Support for open drain/collector gpios
@ 2012-02-17 16:37       ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2012-02-17 16:37 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: grant.likely, linus.walleij, rdunlap, linux-doc, linux-kernel,
	linux-tegra

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

On Fri, Feb 17, 2012 at 08:26:21PM +0530, Laxman Dewangan wrote:
> Adding support for the open drain gpio on which client
> can specify the open drain property through GPIO flag
> GPIOF_OPEN_DRAIN at the time of gpio request.
> The open drain pins are normally pulled high and it
> cannot be driven to output with value of 1 and so
> when client request for setting the pin to HIGH, the
> gpio will be set to input direction to make pin in tristate
> and hence PULL-UP on pins will make the state to HIGH.
> The open drain pin can be driven to LOW by setting output
> with value of 0.

Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH V2 0/3] Open drain/open source support from gpio library
  2012-02-17 14:56     ` Laxman Dewangan
@ 2012-02-17 18:21         ` Linus Walleij
  -1 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2012-02-17 18:21 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	linus.walleij-0IS4wlFg1OjSUeElwK9/Pw,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Fri, Feb 17, 2012 at 3:56 PM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:

> This patch is as per discussion on the patch
> [PATCH V1] regulator: fixed: Support for open-drain gpio
> where it was suggested to push the handling of open drain gpios
> into the gpio libray.

Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
For this patch set.

Yours,
Linus Walleij

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

* Re: [PATCH V2 0/3] Open drain/open source support from gpio library
@ 2012-02-17 18:21         ` Linus Walleij
  0 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2012-02-17 18:21 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: broonie, grant.likely, linus.walleij, rdunlap, linux-doc,
	linux-kernel, linux-tegra

On Fri, Feb 17, 2012 at 3:56 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote:

> This patch is as per discussion on the patch
> [PATCH V1] regulator: fixed: Support for open-drain gpio
> where it was suggested to push the handling of open drain gpios
> into the gpio libray.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
For this patch set.

Yours,
Linus Walleij

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

* Re: [PATCH V2 0/3] Open drain/open source support from gpio library
  2012-02-17 18:21         ` Linus Walleij
@ 2012-02-27 12:45           ` Laxman Dewangan
  -1 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-27 12:45 UTC (permalink / raw)
  To: Linus Walleij
  Cc: broonie, grant.likely, linus.walleij, rdunlap, linux-doc,
	linux-kernel, linux-tegra

Hi Grant,
Although it is not too old patch but can you please review and if it is 
OK then apply ;)  ?

Thanks,
Laxman


On Friday 17 February 2012 11:51 PM, Linus Walleij wrote:
> On Fri, Feb 17, 2012 at 3:56 PM, Laxman Dewangan<ldewangan@nvidia.com>  wrote:
>
>> This patch is as per discussion on the patch
>> [PATCH V1] regulator: fixed: Support for open-drain gpio
>> where it was suggested to push the handling of open drain gpios
>> into the gpio libray.
> Acked-by: Linus Walleij<linus.walleij@linaro.org>
> For this patch set.
>
> Yours,
> Linus Walleij

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

* Re: [PATCH V2 0/3] Open drain/open source support from gpio library
@ 2012-02-27 12:45           ` Laxman Dewangan
  0 siblings, 0 replies; 16+ messages in thread
From: Laxman Dewangan @ 2012-02-27 12:45 UTC (permalink / raw)
  To: Linus Walleij
  Cc: broonie, grant.likely, linus.walleij, rdunlap, linux-doc,
	linux-kernel, linux-tegra

Hi Grant,
Although it is not too old patch but can you please review and if it is 
OK then apply ;)  ?

Thanks,
Laxman


On Friday 17 February 2012 11:51 PM, Linus Walleij wrote:
> On Fri, Feb 17, 2012 at 3:56 PM, Laxman Dewangan<ldewangan@nvidia.com>  wrote:
>
>> This patch is as per discussion on the patch
>> [PATCH V1] regulator: fixed: Support for open-drain gpio
>> where it was suggested to push the handling of open drain gpios
>> into the gpio libray.
> Acked-by: Linus Walleij<linus.walleij@linaro.org>
> For this patch set.
>
> Yours,
> Linus Walleij


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

* Re: [PATCH V2 0/3] Open drain/open source support from gpio library
  2012-02-17 14:56 ` Laxman Dewangan
                   ` (4 preceding siblings ...)
  (?)
@ 2012-03-05 14:50 ` Grant Likely
  -1 siblings, 0 replies; 16+ messages in thread
From: Grant Likely @ 2012-03-05 14:50 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: broonie, linus.walleij, rdunlap, linux-doc, linux-kernel, linux-tegra

On Fri, Feb 17, 2012 at 08:26:18PM +0530, Laxman Dewangan wrote:
> This patch is as per discussion on the patch
> [PATCH V1] regulator: fixed: Support for open-drain gpio 
> where it was suggested to push the handling of open drain gpios
> into the gpio libray.
> 
> This is series of patches  to add support of the open drain and open
> source gpios in standard gpio library.
> - Added GPIOF_OPEN_DRAIN flag so that client can request the
>   gpio with this flag. Handle open drain gpio configuration properly.
> - Added GPIOF_OPEN_SOURCE flag so that client can request the
>   gpio with this flag. Handle open source gpio configuration properly.
> - Gpio documentation changes to have support for open-drain.
> 
> From the patch series of V1, it is discussed to
> - remove the sysfs interface supportsi for open drain.
> - Added open source support as a new change.
> 
> Laxman Dewangan (3):
>   Documentation: gpio: Add details of open-drain/source configuration
>   gpio: gpiolib: Support for open drain/collector gpios
>   gpio: gpiolib: Support for open source/emitter gpios

Applied, thanks

g.

> 
>  Documentation/gpio.txt |   17 +++++++++-
>  drivers/gpio/gpiolib.c |   83 ++++++++++++++++++++++++++++++++++++++++++++++-
>  include/linux/gpio.h   |    6 +++
>  3 files changed, 102 insertions(+), 4 deletions(-)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2012-03-05 14:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 14:56 [PATCH V2 0/3] Open drain/open source support from gpio library Laxman Dewangan
2012-02-17 14:56 ` Laxman Dewangan
     [not found] ` <1329490582-22107-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-17 14:56   ` Laxman Dewangan
2012-02-17 14:56     ` Laxman Dewangan
     [not found]     ` <1329490582-22107-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-17 18:21       ` Linus Walleij
2012-02-17 18:21         ` Linus Walleij
2012-02-27 12:45         ` Laxman Dewangan
2012-02-27 12:45           ` Laxman Dewangan
2012-02-17 14:56 ` [PATCH V2 1/3] Documentation: gpio: Add details of open-drain/source configuration Laxman Dewangan
2012-02-17 14:56 ` [PATCH V2 2/3] gpio: gpiolib: Support for open drain/collector gpios Laxman Dewangan
     [not found]   ` <1329490582-22107-4-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-17 16:37     ` Mark Brown
2012-02-17 16:37       ` Mark Brown
2012-02-17 14:56 ` [PATCH V2 3/3] gpio: gpiolib: Support for open source/emitter gpios Laxman Dewangan
     [not found]   ` <1329490582-22107-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-02-17 16:30     ` Mark Brown
2012-02-17 16:30       ` Mark Brown
2012-03-05 14:50 ` [PATCH V2 0/3] Open drain/open source support from gpio library Grant Likely

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.