* [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval
@ 2015-08-19 10:18 Markus Pargmann
2015-08-19 10:18 ` [PATCH 1/3] gpio: Use __gpiod_request directly Markus Pargmann
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Markus Pargmann @ 2015-08-19 10:18 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre Courbot, Arun Bharadwaj, Uwe Kleine-König,
Johan Hovold, linux-gpio, linux-arm-kernel, kernel,
Markus Pargmann
Hi,
This series adds a gpio-initval property to the devicetree. It provides a way
to initialize GPIOs to a defined value.
The previous patch was '[PATCH v2] gpio: Allow hogged gpios to be requested'
which would have allowed to request hogged GPIOs. Linus suggested a separate DT
property as hogged gpios should not be requested.
There are 3 patches. The first two simplify the function gpiod_hog. The third
reuses the gpiod_hog()_code for a new gpiod_initialize() and adds the parsing
of the DT.
This series is based on the series
"[PATCH v3 0/9] gpiolib: Add GPIO name support".
Best regards,
Markus
Markus Pargmann (3):
gpio: Use __gpiod_request directly
gpiolib: gpiod_hog remove separate name argument
gpiolib: Add GPIO initialization
Documentation/devicetree/bindings/gpio/gpio.txt | 29 ++++++----
drivers/gpio/gpiolib-of.c | 11 +++-
drivers/gpio/gpiolib.c | 74 +++++++++++++++++--------
drivers/gpio/gpiolib.h | 6 +-
4 files changed, 83 insertions(+), 37 deletions(-)
--
2.4.6
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] gpio: Use __gpiod_request directly
2015-08-19 10:18 [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
@ 2015-08-19 10:18 ` Markus Pargmann
2015-09-07 8:05 ` Uwe Kleine-König
2015-08-19 10:18 ` [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument Markus Pargmann
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Markus Pargmann @ 2015-08-19 10:18 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre Courbot, Arun Bharadwaj, Uwe Kleine-König,
Johan Hovold, linux-gpio, linux-arm-kernel, kernel,
Markus Pargmann, Markus Pargmann
From: Markus Pargmann <mpa@devmp.org>
There is no reason to find out chip and hwnum to use to request a gpio
and get another gpio descriptor. We already have the descriptor we want
to use so we can directly use it.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
drivers/gpio/gpiolib.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 79a0b41ce57b..872fdd3617c1 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2189,25 +2189,20 @@ EXPORT_SYMBOL_GPL(__gpiod_get_index_optional);
int gpiod_hog(struct gpio_desc *desc, const char *name,
unsigned long lflags, enum gpiod_flags dflags)
{
- struct gpio_chip *chip;
- struct gpio_desc *local_desc;
- int hwnum;
int status;
- chip = gpiod_to_chip(desc);
- hwnum = gpio_chip_hwgpio(desc);
-
- local_desc = gpiochip_request_own_desc(chip, hwnum, name);
- if (IS_ERR(local_desc)) {
+ status = __gpiod_request(desc, name);
+ if (status) {
pr_err("requesting hog GPIO %s (chip %s, offset %d) failed\n",
- name, chip->label, hwnum);
- return PTR_ERR(local_desc);
+ name, gpiod_to_chip(desc)->label,
+ gpio_chip_hwgpio(desc));
+ return status;
}
status = gpiod_configure_flags(desc, name, lflags, dflags);
if (status < 0) {
pr_err("setup of hog GPIO %s (chip %s, offset %d) failed\n",
- name, chip->label, hwnum);
+ name, gpiod_to_chip(desc)->label, gpio_chip_hwgpio(desc));
gpiochip_free_own_desc(desc);
return status;
}
--
2.4.6
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument
2015-08-19 10:18 [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
2015-08-19 10:18 ` [PATCH 1/3] gpio: Use __gpiod_request directly Markus Pargmann
@ 2015-08-19 10:18 ` Markus Pargmann
2015-09-07 8:08 ` Uwe Kleine-König
2015-08-19 10:18 ` [PATCH 3/3] gpiolib: Add GPIO initialization Markus Pargmann
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Markus Pargmann @ 2015-08-19 10:18 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre Courbot, Arun Bharadwaj, Uwe Kleine-König,
Johan Hovold, linux-gpio, linux-arm-kernel, kernel,
Markus Pargmann, Markus Pargmann
From: Markus Pargmann <mpa@devmp.org>
The gpio name is now stored in the gpio descriptor, so we can simply use
that instead of an argument to the function.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
drivers/gpio/gpiolib-of.c | 2 +-
drivers/gpio/gpiolib.c | 8 ++++----
drivers/gpio/gpiolib.h | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 48a7579dd62d..f1fe5123da28 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -232,7 +232,7 @@ static void of_gpiochip_scan_gpios(struct gpio_chip *chip)
continue;
}
- if (gpiod_hog(desc, name, lflags, dflags))
+ if (gpiod_hog(desc, lflags, dflags))
continue;
}
}
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 872fdd3617c1..f1559fa72c36 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2181,15 +2181,15 @@ EXPORT_SYMBOL_GPL(__gpiod_get_index_optional);
/**
* gpiod_hog - Hog the specified GPIO desc given the provided flags
* @desc: gpio whose value will be assigned
- * @name: gpio line name
* @lflags: gpio_lookup_flags - returned from of_find_gpio() or
* of_get_gpio_hog()
* @dflags: gpiod_flags - optional GPIO initialization flags
*/
-int gpiod_hog(struct gpio_desc *desc, const char *name,
- unsigned long lflags, enum gpiod_flags dflags)
+int gpiod_hog(struct gpio_desc *desc, unsigned long lflags,
+ enum gpiod_flags dflags)
{
int status;
+ const char *name = desc->name;
status = __gpiod_request(desc, name);
if (status) {
@@ -2211,7 +2211,7 @@ int gpiod_hog(struct gpio_desc *desc, const char *name,
set_bit(FLAG_IS_HOGGED, &desc->flags);
pr_info("GPIO line %d (%s) hogged as %s%s\n",
- desc_to_gpio(desc), name,
+ desc_to_gpio(desc), desc->name,
(dflags&GPIOD_FLAGS_BIT_DIR_OUT) ? "output" : "input",
(dflags&GPIOD_FLAGS_BIT_DIR_OUT) ?
(dflags&GPIOD_FLAGS_BIT_DIR_VAL) ? "/high" : "/low":"");
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 78e634d1c719..6c2aeff59f86 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -97,8 +97,8 @@ struct gpio_desc {
int gpiod_request(struct gpio_desc *desc, const char *label);
void gpiod_free(struct gpio_desc *desc);
-int gpiod_hog(struct gpio_desc *desc, const char *name,
- unsigned long lflags, enum gpiod_flags dflags);
+int gpiod_hog(struct gpio_desc *desc, unsigned long lflags,
+ enum gpiod_flags dflags);
/*
* Return the GPIO number of the passed descriptor relative to its chip
--
2.4.6
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] gpiolib: Add GPIO initialization
2015-08-19 10:18 [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
2015-08-19 10:18 ` [PATCH 1/3] gpio: Use __gpiod_request directly Markus Pargmann
2015-08-19 10:18 ` [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument Markus Pargmann
@ 2015-08-19 10:18 ` Markus Pargmann
2015-08-26 12:08 ` Linus Walleij
2015-08-19 10:35 ` [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
2015-09-07 9:47 ` Russell King - ARM Linux
4 siblings, 1 reply; 10+ messages in thread
From: Markus Pargmann @ 2015-08-19 10:18 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre Courbot, Arun Bharadwaj, Uwe Kleine-König,
Johan Hovold, linux-gpio, linux-arm-kernel, kernel,
Markus Pargmann
From: Markus Pargmann <mpa@devmp.org>
This functions adds a way to initialize a GPIO without hogging it.
Signed-off-by: Markus Pargmann <mpa@devmp.org>
---
Documentation/devicetree/bindings/gpio/gpio.txt | 29 +++++++------
drivers/gpio/gpiolib-of.c | 9 ++++
drivers/gpio/gpiolib.c | 55 ++++++++++++++++++++-----
drivers/gpio/gpiolib.h | 2 +
4 files changed, 73 insertions(+), 22 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
index 5788d5cf1252..55d58983ba43 100644
--- a/Documentation/devicetree/bindings/gpio/gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio.txt
@@ -116,29 +116,34 @@ Every GPIO controller node must contain both an empty "gpio-controller"
property, and a #gpio-cells integer property, which indicates the number of
cells in a gpio-specifier.
-The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
-providing automatic GPIO request and configuration as part of the
-gpio-controller's driver probe function.
+The GPIO chip may contain GPIO definitions. These define properties for single
+GPIOs of this controller.
-Each GPIO hog definition is represented as a child node of the GPIO controller.
+GPIO hogging is a mechanism providing automatic GPIO request and configuration
+as part of the gpio-controller's driver probe function.
+
+GPIO initialization provides an automatic initialization to known save values.
+Instead of GPIO hogging the GPIO's value and direction can be modified by other
+users after it was initialized.
+
+Each GPIO definition is represented as a child node of the GPIO controller.
Required properties:
-- gpio-hog: A property specifying that this child node represent a GPIO hog.
- gpios: Store the GPIO information (id, flags, ...). Shall contain the
number of cells specified in its parent node (GPIO controller
node).
-Only one of the following properties scanned in the order shown below.
-This means that when multiple properties are present they will be searched
-in the order presented below and the first match is taken as the intended
-configuration.
+
+Optional properties:
+- line-name: The GPIO label name. If not present the node name is used.
+ Only one of gpio-hog and gpio-initval may be specified.
+- gpio-hog: A property specifying that this child node represent a GPIO hog.
+- gpio-initval: This GPIO should be initialized to the specified configuration.
+ Only one of input, output-low and output-high may be specified:
- input: A property specifying to set the GPIO direction as input.
- output-low A property specifying to set the GPIO direction as output with
the value low.
- output-high A property specifying to set the GPIO direction as output with
the value high.
-Optional properties:
-- line-name: The GPIO label name. If not present the node name is used.
-
Example of two SOC GPIO banks defined as gpio-controller nodes:
qe_pio_a: gpio-controller@1400 {
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index f1fe5123da28..ee00c2c63f57 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -234,6 +234,15 @@ static void of_gpiochip_scan_gpios(struct gpio_chip *chip)
if (gpiod_hog(desc, lflags, dflags))
continue;
+ } else if (of_property_read_bool(np, "gpio-initval")) {
+ if (!dflags) {
+ dev_warn(chip->dev, "GPIO line %d (%s): no initialization state specified, bailing out\n",
+ desc_to_gpio(desc), np->name);
+ continue;
+ }
+
+ if (gpiod_initialize(desc, lflags, dflags))
+ continue;
}
}
}
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f1559fa72c36..d7aa27a92e82 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2178,15 +2178,8 @@ struct gpio_desc *__must_check __gpiod_get_index_optional(struct device *dev,
}
EXPORT_SYMBOL_GPL(__gpiod_get_index_optional);
-/**
- * gpiod_hog - Hog the specified GPIO desc given the provided flags
- * @desc: gpio whose value will be assigned
- * @lflags: gpio_lookup_flags - returned from of_find_gpio() or
- * of_get_gpio_hog()
- * @dflags: gpiod_flags - optional GPIO initialization flags
- */
-int gpiod_hog(struct gpio_desc *desc, unsigned long lflags,
- enum gpiod_flags dflags)
+static int _gpiod_initialize(struct gpio_desc *desc, unsigned long lflags,
+ enum gpiod_flags dflags)
{
int status;
const char *name = desc->name;
@@ -2202,11 +2195,31 @@ int gpiod_hog(struct gpio_desc *desc, unsigned long lflags,
status = gpiod_configure_flags(desc, name, lflags, dflags);
if (status < 0) {
pr_err("setup of hog GPIO %s (chip %s, offset %d) failed\n",
- name, gpiod_to_chip(desc)->label, gpio_chip_hwgpio(desc));
+ name, gpiod_to_chip(desc)->label,
+ gpio_chip_hwgpio(desc));
gpiochip_free_own_desc(desc);
return status;
}
+ return 0;
+}
+
+/**
+ * gpiod_hog - Hog the specified GPIO desc given the provided flags
+ * @desc: gpio whose value will be assigned
+ * @lflags: gpio_lookup_flags - returned from of_find_gpio() or
+ * of_get_gpio_hog()
+ * @dflags: gpiod_flags - optional GPIO initialization flags
+ */
+int gpiod_hog(struct gpio_desc *desc, unsigned long lflags,
+ enum gpiod_flags dflags)
+{
+ int ret;
+
+ ret = _gpiod_initialize(desc, lflags, dflags);
+ if (ret)
+ return ret;
+
/* Mark GPIO as hogged so it can be identified and removed later */
set_bit(FLAG_IS_HOGGED, &desc->flags);
@@ -2236,6 +2249,28 @@ static void gpiochip_free_hogs(struct gpio_chip *chip)
}
/**
+ * gpiod_initialize - Initialize a GPIO with a given value
+ * @desc: gpio whose value will be assigned
+ * @lflags: gpio_lookup_flags - returned from of_find_gpio() or
+ * of_get_gpio_hog()
+ * @dflags: gpiod_flags - optional GPIO initialization flags
+ *
+ * This is used to initialize GPIOs that were defined in DT
+ */
+int gpiod_initialize(struct gpio_desc *desc, unsigned long lflags,
+ enum gpiod_flags dflags)
+{
+ int ret;
+
+ ret = _gpiod_initialize(desc, lflags, dflags);
+ if (ret)
+ return ret;
+
+ __gpiod_free(desc);
+ return ret;
+}
+
+/**
* gpiod_get_array - obtain multiple GPIOs from a multi-index GPIO function
* @dev: GPIO consumer, can be NULL for system-global GPIOs
* @con_id: function within the GPIO consumer
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 6c2aeff59f86..b6dfa3526e3a 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -99,6 +99,8 @@ int gpiod_request(struct gpio_desc *desc, const char *label);
void gpiod_free(struct gpio_desc *desc);
int gpiod_hog(struct gpio_desc *desc, unsigned long lflags,
enum gpiod_flags dflags);
+int gpiod_initialize(struct gpio_desc *desc, unsigned long lflags,
+ enum gpiod_flags dflags);
/*
* Return the GPIO number of the passed descriptor relative to its chip
--
2.4.6
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval
2015-08-19 10:18 [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
` (2 preceding siblings ...)
2015-08-19 10:18 ` [PATCH 3/3] gpiolib: Add GPIO initialization Markus Pargmann
@ 2015-08-19 10:35 ` Markus Pargmann
2015-09-07 9:47 ` Russell King - ARM Linux
4 siblings, 0 replies; 10+ messages in thread
From: Markus Pargmann @ 2015-08-19 10:35 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre Courbot, Arun Bharadwaj, Johan Hovold, linux-gpio,
kernel, Uwe Kleine-König, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
On Wed, Aug 19, 2015 at 12:18:29PM +0200, Markus Pargmann wrote:
> Hi,
>
> This series adds a gpio-initval property to the devicetree. It provides a way
> to initialize GPIOs to a defined value.
>
> The previous patch was '[PATCH v2] gpio: Allow hogged gpios to be requested'
> which would have allowed to request hogged GPIOs. Linus suggested a separate DT
> property as hogged gpios should not be requested.
>
> There are 3 patches. The first two simplify the function gpiod_hog. The third
> reuses the gpiod_hog()_code for a new gpiod_initialize() and adds the parsing
> of the DT.
>
> This series is based on the series
> "[PATCH v3 0/9] gpiolib: Add GPIO name support".
Messed up all the author/signed-off-bys. I will fix it in v2 but will
wait for some feedback first.
Best regards,
Markus
>
> Best regards,
>
> Markus
>
>
> Markus Pargmann (3):
> gpio: Use __gpiod_request directly
> gpiolib: gpiod_hog remove separate name argument
> gpiolib: Add GPIO initialization
>
> Documentation/devicetree/bindings/gpio/gpio.txt | 29 ++++++----
> drivers/gpio/gpiolib-of.c | 11 +++-
> drivers/gpio/gpiolib.c | 74 +++++++++++++++++--------
> drivers/gpio/gpiolib.h | 6 +-
> 4 files changed, 83 insertions(+), 37 deletions(-)
>
> --
> 2.4.6
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] gpiolib: Add GPIO initialization
2015-08-19 10:18 ` [PATCH 3/3] gpiolib: Add GPIO initialization Markus Pargmann
@ 2015-08-26 12:08 ` Linus Walleij
0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2015-08-26 12:08 UTC (permalink / raw)
To: Markus Pargmann
Cc: Alexandre Courbot, Arun Bharadwaj, Uwe Kleine-König,
Johan Hovold, linux-gpio@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Sascha Hauer,
Markus Pargmann
On Wed, Aug 19, 2015 at 12:18 PM, Markus Pargmann <mpa@pengutronix.de> wrote:
> From: Markus Pargmann <mpa@devmp.org>
>
> This functions adds a way to initialize a GPIO without hogging it.
>
> Signed-off-by: Markus Pargmann <mpa@devmp.org>
> ---
> Documentation/devicetree/bindings/gpio/gpio.txt | 29 +++++++------
This needs to go to devicetree@vger.kernel.org for review.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] gpio: Use __gpiod_request directly
2015-08-19 10:18 ` [PATCH 1/3] gpio: Use __gpiod_request directly Markus Pargmann
@ 2015-09-07 8:05 ` Uwe Kleine-König
0 siblings, 0 replies; 10+ messages in thread
From: Uwe Kleine-König @ 2015-09-07 8:05 UTC (permalink / raw)
To: Markus Pargmann
Cc: Linus Walleij, Alexandre Courbot, Arun Bharadwaj, Johan Hovold,
linux-gpio, linux-arm-kernel, kernel, Markus Pargmann
On Wed, Aug 19, 2015 at 12:18:30PM +0200, Markus Pargmann wrote:
> From: Markus Pargmann <mpa@devmp.org>
>
> There is no reason to find out chip and hwnum to use to request a gpio
> and get another gpio descriptor. We already have the descriptor we want
> to use so we can directly use it.
>
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument
2015-08-19 10:18 ` [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument Markus Pargmann
@ 2015-09-07 8:08 ` Uwe Kleine-König
2015-09-15 8:50 ` Markus Pargmann
0 siblings, 1 reply; 10+ messages in thread
From: Uwe Kleine-König @ 2015-09-07 8:08 UTC (permalink / raw)
To: Markus Pargmann
Cc: Linus Walleij, Alexandre Courbot, Arun Bharadwaj, Johan Hovold,
linux-gpio, linux-arm-kernel, kernel, Markus Pargmann
On Wed, Aug 19, 2015 at 12:18:31PM +0200, Markus Pargmann wrote:
> From: Markus Pargmann <mpa@devmp.org>
>
> The gpio name is now stored in the gpio descriptor, so we can simply use
What is now? Does this introduce a dependency; maybe better reference a
commit here?
> that instead of an argument to the function.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval
2015-08-19 10:18 [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
` (3 preceding siblings ...)
2015-08-19 10:35 ` [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
@ 2015-09-07 9:47 ` Russell King - ARM Linux
4 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-09-07 9:47 UTC (permalink / raw)
To: Markus Pargmann
Cc: Linus Walleij, Alexandre Courbot, Arun Bharadwaj, Johan Hovold,
linux-gpio, kernel, Uwe Kleine-König, linux-arm-kernel
On Wed, Aug 19, 2015 at 12:18:29PM +0200, Markus Pargmann wrote:
> This series adds a gpio-initval property to the devicetree. It provides a way
> to initialize GPIOs to a defined value.
This is actually a good thing to have. I know at least one SoC contains
a paragraph in its hardware spec:
General Purpose Pins (GPP)
Each individual pin can be defined as an input, output, or level interrupt
input. These pins can be used for indications retrieving or for peripherals
control. When not in use, program interface to GPIOs and set GPIOs as output.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument
2015-09-07 8:08 ` Uwe Kleine-König
@ 2015-09-15 8:50 ` Markus Pargmann
0 siblings, 0 replies; 10+ messages in thread
From: Markus Pargmann @ 2015-09-15 8:50 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Linus Walleij, Alexandre Courbot, Arun Bharadwaj, Johan Hovold,
linux-gpio, linux-arm-kernel, kernel, Markus Pargmann
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
Hi,
On Mon, Sep 07, 2015 at 10:08:18AM +0200, Uwe Kleine-König wrote:
> On Wed, Aug 19, 2015 at 12:18:31PM +0200, Markus Pargmann wrote:
> > From: Markus Pargmann <mpa@devmp.org>
> >
> > The gpio name is now stored in the gpio descriptor, so we can simply use
>
> What is now? Does this introduce a dependency; maybe better reference a
> commit here?
Thanks. Yes this was refering to patch 3 of series
"gpiolib: Add GPIO name support",
patch "gpiolib: Use GPIO name from names array for gpio descriptor".
However I can only reference by name here. Will add it to the commit
message.
Best Regards,
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-09-15 8:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 10:18 [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
2015-08-19 10:18 ` [PATCH 1/3] gpio: Use __gpiod_request directly Markus Pargmann
2015-09-07 8:05 ` Uwe Kleine-König
2015-08-19 10:18 ` [PATCH 2/3] gpiolib: gpiod_hog remove separate name argument Markus Pargmann
2015-09-07 8:08 ` Uwe Kleine-König
2015-09-15 8:50 ` Markus Pargmann
2015-08-19 10:18 ` [PATCH 3/3] gpiolib: Add GPIO initialization Markus Pargmann
2015-08-26 12:08 ` Linus Walleij
2015-08-19 10:35 ` [PATCH 0/3] gpiolib: Initializing GPIOs using DT property gpio-initval Markus Pargmann
2015-09-07 9:47 ` Russell King - ARM Linux
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).