Skip to contentSkip to conversation

Introduce a managed function for gpio_request_array

PATCH In review Himangi Saraogi 6 participants 17 messages Jul 6, 2014 – Aug 14, 2014

Subsystems (6)
Documentation Sound ASoC GPIO +2 more subsystems
lore
Share & tools
lore
#0 lore raw

cover Introduce a managed function for gpio_request_array

This patchset intoduces a new managed interface devm_gpio_request_array, adds it in the documentation and its declaration in the gpio.h include file. Some cases of gpio_request_array are changed to devm_gpio_request_array.

Himangi Saraogi (5):
gpiolib: devres: Introduce the function devm_request_gpio_array
ASoC: wm1250-ev1: Use devm_gpio_request_array
ASoC: pxa: Use devm_gpio_request_array
ASoC: pxa: e800_wm9712: Introduce the use of devm_gpio_request_array
ASoC: pxa/hx4700: Introduce the use of devm_gpio_request_array

 Documentation/driver-model/devres.txt |  1 +
 drivers/gpio/devres.c                 | 21 +++++++++++++++++++++
 include/linux/gpio.h                  |  2 ++
 sound/soc/codecs/wm1250-ev1.c         | 24 +++++-------------------
 sound/soc/pxa/e740_wm9705.c           |  9 +++------
 sound/soc/pxa/e800_wm9712.c           |  9 +++------
 sound/soc/pxa/hx4700.c                | 12 +++---------
 7 files changed, 38 insertions(+), 40 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/5 gpiolib: devres: Introduce the function devm_request_gpio_array

This patch introduces the function devm_request_gpio_array that allocates multiple GPIOs in a single call in a managed manner. The function is also included in the documentation and a declaration is added in include/linux/gpio.h.

---
 Documentation/driver-model/devres.txt |  1 +
 drivers/gpio/devres.c                 | 21 +++++++++++++++++++++
 include/linux/gpio.h                  |  2 ++
 3 files changed, 24 insertions(+)
Documentation/driver-model/devres.txt +1 -0
index 9e2098e..756f6cf 100644
@@ -337,6 +337,7 @@ GPIO
   devm_gpiod_put()
   devm_gpio_request()
   devm_gpio_request_one()
+  devm_gpio_request_array()
   devm_gpio_free()
 
 SND
drivers/gpio/devres.c +21 -0
index 65978cf..adae7fa 100644
@@ -229,6 +229,27 @@ int devm_gpio_request_one(struct device *dev, unsigned gpio,
 EXPORT_SYMBOL(devm_gpio_request_one);
 
 /**
+ *	devm_gpio_request_array - request multiple GPIOs in a single call
+ *	@dev:   device to request for
+ *	@array:	array of the 'struct gpio'
+ *	@num:	how many GPIOs in the array
+ */
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num)
+{
+	int i, err;
+
+	for (i = 0; i < num; i++, array++) {
+		err = devm_gpio_request_one(dev, array->gpio, array->flags,
+					    array->label);
+		if (err)
+			return err;
+	}
+	return 0;
+}
+EXPORT_SYMBOL_GPL(devm_gpio_request_array);
+
+/**
  *      devm_gpio_free - free a GPIO
  *      @dev: device to free GPIO for
  *      @gpio: GPIO to free
include/linux/gpio.h +2 -0
index 85aa5d0..c85f243 100644
@@ -84,6 +84,8 @@ struct device;
 int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
 int devm_gpio_request_one(struct device *dev, unsigned gpio,
 			  unsigned long flags, const char *label);
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num);
 void devm_gpio_free(struct device *dev, unsigned int gpio);
 
 #else /* ! CONFIG_GPIOLIB */
Signature · 1 line
1.9.1
#11 lore raw

PATCH 2/5 ASoC: wm1250-ev1: Use devm_gpio_request_array

In reply to Himangi Saraogi

This patch replaces a call to the unmanaged function gpio_request_array by a call to the managed function devm_gpio_request_array and removes the calls to gpio_free_array in wm1250_ev1_pdata, which is called by the probe function. The function wm1250_ev1_free is no longer needed and is removed.

---
 sound/soc/codecs/wm1250-ev1.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
sound/soc/codecs/wm1250-ev1.c +2 -11
index 8011f75..44534e6 100644
@@ -176,7 +176,8 @@ static int wm1250_ev1_pdata(struct i2c_client *i2c)
 	wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL0].flags = GPIOF_OUT_INIT_HIGH;
 	wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL1].flags = GPIOF_OUT_INIT_HIGH;
 
-	ret = gpio_request_array(wm1250->gpios, ARRAY_SIZE(wm1250->gpios));
+	ret = devm_gpio_request_array(&i2c->dev, wm1250->gpios,
+				      ARRAY_SIZE(wm1250->gpios));
 	if (ret != 0) {
 		dev_err(&i2c->dev, "Failed to get GPIOs: %d\n", ret);
 		goto err;
@@ -190,14 +191,6 @@ err:
 	return ret;
 }
 
-static void wm1250_ev1_free(struct i2c_client *i2c)
-{
-	struct wm1250_priv *wm1250 = dev_get_drvdata(&i2c->dev);
-
-	if (wm1250)
-		gpio_free_array(wm1250->gpios, ARRAY_SIZE(wm1250->gpios));
-}
-
 static int wm1250_ev1_probe(struct i2c_client *i2c,
 			    const struct i2c_device_id *i2c_id)
 {
@@ -229,7 +222,6 @@ static int wm1250_ev1_probe(struct i2c_client *i2c,
 				     &wm1250_ev1_dai, 1);
 	if (ret != 0) {
 		dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
-		wm1250_ev1_free(i2c);
 		return ret;
 	}
 
@@ -239,7 +231,6 @@ static int wm1250_ev1_probe(struct i2c_client *i2c,
 static int wm1250_ev1_remove(struct i2c_client *i2c)
 {
 	snd_soc_unregister_codec(&i2c->dev);
-	wm1250_ev1_free(i2c);
 
 	return 0;
 }
Signature · 1 line
1.9.1
#12 lore raw

PATCH 3/5 ASoC: pxa: Use devm_gpio_request_array

In reply to Himangi Saraogi

This patch moves data allocated using gpio_request_array to the managed interface and removes the calls to gpio_free_array in the probe and remove functions.

---
 sound/soc/pxa/e740_wm9705.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
sound/soc/pxa/e740_wm9705.c +3 -6
index c29feda..d462dc9 100644
@@ -149,19 +149,17 @@ static int e740_probe(struct platform_device *pdev)
 	struct snd_soc_card *card = &e740;
 	int ret;
 
-	ret = gpio_request_array(e740_audio_gpios,
-				 ARRAY_SIZE(e740_audio_gpios));
+	ret = devm_gpio_request_array(&pdev->dev, e740_audio_gpios,
+				      ARRAY_SIZE(e740_audio_gpios));
 	if (ret)
 		return ret;
 
 	card->dev = &pdev->dev;
 
 	ret = snd_soc_register_card(card);
-	if (ret) {
+	if (ret)
 		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
 			ret);
-		gpio_free_array(e740_audio_gpios, ARRAY_SIZE(e740_audio_gpios));
-	}
 	return ret;
 }
 
@@ -169,7 +167,6 @@ static int e740_remove(struct platform_device *pdev)
 {
 	struct snd_soc_card *card = platform_get_drvdata(pdev);
 
-	gpio_free_array(e740_audio_gpios, ARRAY_SIZE(e740_audio_gpios));
 	snd_soc_unregister_card(card);
 	return 0;
 }
Signature · 1 line
1.9.1
#13 lore raw

PATCH 4/5 ASoC: pxa: e800_wm9712: Introduce the use of devm_gpio_request_array

In reply to Himangi Saraogi

This patch moves the resources allocated using gpio_request_array to the managed interface and removes the calls to gpio_free_array in the probe and remove functions.

---
 sound/soc/pxa/e800_wm9712.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
sound/soc/pxa/e800_wm9712.c +3 -6
index 24c2078..dbc3670 100644
@@ -112,19 +112,17 @@ static int e800_probe(struct platform_device *pdev)
 	struct snd_soc_card *card = &e800;
 	int ret;
 
-	ret = gpio_request_array(e800_audio_gpios,
-				 ARRAY_SIZE(e800_audio_gpios));
+	ret = devm_gpio_request_array(&pdev->dev, e800_audio_gpios,
+				      ARRAY_SIZE(e800_audio_gpios));
 	if (ret)
 		return ret;
 
 	card->dev = &pdev->dev;
 
 	ret = snd_soc_register_card(card);
-	if (ret) {
+	if (ret)
 		dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
 			ret);
-		gpio_free_array(e800_audio_gpios, ARRAY_SIZE(e800_audio_gpios));
-	}
 	return ret;
 }
 
@@ -132,7 +130,6 @@ static int e800_remove(struct platform_device *pdev)
 {
 	struct snd_soc_card *card = platform_get_drvdata(pdev);
 
-	gpio_free_array(e800_audio_gpios, ARRAY_SIZE(e800_audio_gpios));
 	snd_soc_unregister_card(card);
 	return 0;
 }
Signature · 1 line
1.9.1
#14 lore raw

PATCH 5/5 ASoC: pxa/hx4700: Introduce the use of devm_gpio_request_array

In reply to Himangi Saraogi

This patch moves the resources allocated using gpio_request_array to the managed interface and removes the calls to gpio_free_array in the probe and remove functions.

---
 sound/soc/pxa/hx4700.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
sound/soc/pxa/hx4700.c +3 -9
index 05559a7..b624526 100644
@@ -198,18 +198,13 @@ static int hx4700_audio_probe(struct platform_device *pdev)
 	if (!machine_is_h4700())
 		return -ENODEV;
 
-	ret = gpio_request_array(hx4700_audio_gpios,
-				ARRAY_SIZE(hx4700_audio_gpios));
+	ret = devm_gpio_request_array(&pdev->dev, hx4700_audio_gpios,
+				      ARRAY_SIZE(hx4700_audio_gpios));
 	if (ret)
 		return ret;
 
 	snd_soc_card_hx4700.dev = &pdev->dev;
-	ret = snd_soc_register_card(&snd_soc_card_hx4700);
-	if (ret)
-		gpio_free_array(hx4700_audio_gpios,
-				ARRAY_SIZE(hx4700_audio_gpios));
-
-	return ret;
+	return snd_soc_register_card(&snd_soc_card_hx4700);
 }
 
 static int hx4700_audio_remove(struct platform_device *pdev)
@@ -219,7 +214,6 @@ static int hx4700_audio_remove(struct platform_device *pdev)
 	gpio_set_value(GPIO92_HX4700_HP_DRIVER, 0);
 	gpio_set_value(GPIO107_HX4700_SPK_nSD, 0);
 
-	gpio_free_array(hx4700_audio_gpios, ARRAY_SIZE(hx4700_audio_gpios));
 	return 0;
 }
 
Signature · 1 line
1.9.1
#15 lore raw
In reply to Himangi Saraogi
Quoted 11 lines · Himangi Saraogi

This patchset intoduces a new managed interface devm_gpio_request_array, adds it in the documentation and its declaration in the gpio.h include file. Some cases of gpio_request_array are changed to devm_gpio_request_array.

Himangi Saraogi (5):
gpiolib: devres: Introduce the function devm_request_gpio_array
ASoC: wm1250-ev1: Use devm_gpio_request_array
ASoC: pxa: Use devm_gpio_request_array
ASoC: pxa: e800_wm9712: Introduce the use of devm_gpio_request_array
ASoC: pxa/hx4700: Introduce the use of devm_gpio_request_array

Sorry, we're not encouraging extension of the old gpio* plain API anymore.

The right thing to do is convert users over to using GPIO descriptors internally, then introduce devm_gpiod_get_array() if that makes some sense.

Alexandre, what do you say?

Yours,
Linus Walleij

#2 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

In reply to Himangi Saraogi

Please note that I submitted a patch on 02/07/14 to create this function which was acked by Linus Walleij on 05/07/14.

Great minds think alike, and all that.

However, I think that the version I submitted better replicates the original (non devm) functionality, see below.

I didn't, however, add it to the documentation. +1 on that.

Quoted 37 lines · Himangi Saraogi

This patch introduces the function devm_request_gpio_array that allocates multiple GPIOs in a single call in a managed manner. The function is also included in the documentation and a declaration is added in include/linux/gpio.h.

---
  Documentation/driver-model/devres.txt |  1 +
  drivers/gpio/devres.c                 | 21 +++++++++++++++++++++
  include/linux/gpio.h                  |  2 ++
  3 files changed, 24 insertions(+)
Documentation/driver-model/devres.txt +1 -0
index 9e2098e..756f6cf 100644
@@ -337,6 +337,7 @@ GPIO
    devm_gpiod_put()
    devm_gpio_request()
    devm_gpio_request_one()
+  devm_gpio_request_array()
    devm_gpio_free()
 
  SND
drivers/gpio/devres.c +5 -0
index 65978cf..adae7fa 100644
@@ -229,6 +229,27 @@ int devm_gpio_request_one(struct device *dev, unsigned gpio,
  EXPORT_SYMBOL(devm_gpio_request_one);
 
  /**
+ *	devm_gpio_request_array - request multiple GPIOs in a single call
+ *	@dev:   device to request for
+ *	@array:	array of the 'struct gpio'
+ *	@num:	how many GPIOs in the array
+ */

drivers/gpio/devres.c int devm_gpio_request_one(struct device *dev, unsigned gpio, · line 246

Quoted 10 lines
drivers/gpio/devres.c +10 -0
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num)
+{
+	int i, err;
+
+	for (i = 0; i < num; i++, array++) {
+		err = devm_gpio_request_one(dev, array->gpio, array->flags,
+					    array->label);
+		if (err)
+			return err;

The failure path in the version I submitted frees up any already allocated gpios on the first failure.

Quoted 23 lines
drivers/gpio/devres.c +6 -0
+	}
+	return 0;
+}
+EXPORT_SYMBOL_GPL(devm_gpio_request_array);
+
+/**
   *      devm_gpio_free - free a GPIO
   *      @dev: device to free GPIO for
   *      @gpio: GPIO to free
include/linux/gpio.h +2 -0
index 85aa5d0..c85f243 100644
@@ -84,6 +84,8 @@ struct device;
  int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
  int devm_gpio_request_one(struct device *dev, unsigned gpio,
  			  unsigned long flags, const char *label);
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num);
  void devm_gpio_free(struct device *dev, unsigned int gpio);
 
  #else /* ! CONFIG_GPIOLIB */
Signature · 4 lines
Rob Jones
Codethink Ltd
mailto:[email protected]
tel:+44 161 236 5575
#3 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

Quoted 55 lines · Rob Jones

Please note that I submitted a patch on 02/07/14 to create this function which was acked by Linus Walleij on 05/07/14.

Great minds think alike, and all that.

However, I think that the version I submitted better replicates the original (non devm) functionality, see below.

I didn't, however, add it to the documentation. +1 on that.

Quoted 44 lines · Himangi Saraogi

This patch introduces the function devm_request_gpio_array that allocates multiple GPIOs in a single call in a managed manner. The function is also included in the documentation and a declaration is added in include/linux/gpio.h.

---
  Documentation/driver-model/devres.txt |  1 +
  drivers/gpio/devres.c                 | 21 +++++++++++++++++++++
  include/linux/gpio.h                  |  2 ++
  3 files changed, 24 insertions(+)
Documentation/driver-model/devres.txt +1 -0
index 9e2098e..756f6cf 100644
@@ -337,6 +337,7 @@ GPIO
    devm_gpiod_put()
    devm_gpio_request()
    devm_gpio_request_one()
+  devm_gpio_request_array()
    devm_gpio_free()
 
  SND
drivers/gpio/devres.c +10 -0
index 65978cf..adae7fa 100644
@@ -229,6 +229,27 @@ int devm_gpio_request_one(struct device *dev, unsigned
 gpio,
  EXPORT_SYMBOL(devm_gpio_request_one);
 
  /**
+ *	devm_gpio_request_array - request multiple GPIOs in a single call
+ *	@dev:   device to request for
+ *	@array:	array of the 'struct gpio'
+ *	@num:	how many GPIOs in the array
+ */
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num)
+{
+	int i, err;
+
Quoted 8 lines

drivers/gpio/devres.c int devm_gpio_request_one(struct device *dev, unsigned gpio, · line 246

Quoted 5 lines
drivers/gpio/devres.c +5 -0
+	for (i = 0; i < num; i++, array++) {
+		err = devm_gpio_request_one(dev, array->gpio, array->flags,
+					    array->label);
+		if (err)
+			return err;

The failure path in the version I submitted frees up any already allocated gpios on the first failure.

Himangi first proposed doing that, but I thought it was not really in the spirit of devm functions, which is to leave that implicit. No strong opinion on the matter, though.

julia

Quoted 32 lines
Quoted 23 lines
drivers/gpio/devres.c +6 -0
+	}
+	return 0;
+}
+EXPORT_SYMBOL_GPL(devm_gpio_request_array);
+
+/**
   *      devm_gpio_free - free a GPIO
   *      @dev: device to free GPIO for

* @gpio: GPIO to free

include/linux/gpio.h +2 -0
index 85aa5d0..c85f243 100644
@@ -84,6 +84,8 @@ struct device;
  int devm_gpio_request(struct device *dev, unsigned gpio, const char
 *label);
  int devm_gpio_request_one(struct device *dev, unsigned gpio,
  			  unsigned long flags, const char *label);
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num);
  void devm_gpio_free(struct device *dev, unsigned int gpio);
 
Quoted 2 lines
  #else /* ! CONFIG_GPIOLIB */

--
Rob Jones
Codethink Ltd
mailto:[email protected]
tel:+44 161 236 5575

#16 lore raw
In reply to Linus Walleij
Quoted 14 lines · Linus Walleij
Quoted 11 lines · Himangi Saraogi

This patchset intoduces a new managed interface devm_gpio_request_array, adds it in the documentation and its declaration in the gpio.h include file. Some cases of gpio_request_array are changed to devm_gpio_request_array.

Himangi Saraogi (5):
gpiolib: devres: Introduce the function devm_request_gpio_array
ASoC: wm1250-ev1: Use devm_gpio_request_array
ASoC: pxa: Use devm_gpio_request_array
ASoC: pxa: e800_wm9712: Introduce the use of devm_gpio_request_array
ASoC: pxa/hx4700: Introduce the use of devm_gpio_request_array

Quoted 7 lines

Sorry, we're not encouraging extension of the old gpio* plain API anymore.

The right thing to do is convert users over to using GPIO descriptors internally, then introduce devm_gpiod_get_array() if that makes some sense.

Alexandre, what do you say?

I do agree that we want to discourage people from using the integer API, and would also prefer to see the consumers converted to gpiod and proper gpiod functions introduced.

On the other hand with Rob's similar patch which seems to be about to be merged (https://lkml.org/lkml/2014/7/2/149 ) I guess the pressure to accept one or the other is quite high. At least, I hope Rob or Himangi will follow-up with a patch adding similar functionality to the gpiod API, and will consider converting their consumers to it (it's for your own good!).

#4 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

In reply to Julia Lawall
Quoted 11 lines · Julia Lawall
Quoted 7 lines · Rob Jones

Please note that I submitted a patch on 02/07/14 to create this function which was acked by Linus Walleij on 05/07/14.

Great minds think alike, and all that.

However, I think that the version I submitted better replicates the original (non devm) functionality, see below.

<snip>

Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpio/devres.c +5 -0
+int devm_gpio_request_array(struct device *dev, const struct gpio *array,
+			    size_t num)
+{
+	int i, err;
+
Quoted 8 lines

drivers/gpio/devres.c int devm_gpio_request_one(struct device *dev, unsigned gpio, · line 246

Quoted 5 lines
drivers/gpio/devres.c +5 -0
+	for (i = 0; i < num; i++, array++) {
+		err = devm_gpio_request_one(dev, array->gpio, array->flags,
+					    array->label);
+		if (err)
+			return err;

The failure path in the version I submitted frees up any already allocated gpios on the first failure.

Quoted 4 lines

Himangi first proposed doing that, but I thought it was not really in the spirit of devm functions, which is to leave that implicit. No strong opinion on the matter, though.

Interestingly, we came at it from the other direction: I originally didn't have the unwind in and our internal review guys suggested that it was in the original function so putting it in would:

1. make this a better analogue of the original
2. help avoid deadlocks
3. allow the driver to retry, perhaps requesting reduced functionality.

Quoted 2 lines

julia

<snip>

Signature · 4 lines
Rob Jones
Codethink Ltd
mailto:[email protected]
tel:+44 161 236 5575
#5 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

In reply to Rob Jones
Quoted 4 lines · Rob Jones

Please note that I submitted a patch on 02/07/14 to create this function which was acked by Linus Walleij on 05/07/14.

Great minds think alike, and all that.

My mind certainly isn't any great :-(

My left hand seems to be unaware of what the right hand is doing.

Did I ACK that for merging through some other tree then?

And I guess if Himangi want to submit these ASoC patches, they will have to go through the same tree as those patches in that case?

And would you consider implementing a gpiod version...?

Quoted 4 lines

However, I think that the version I submitted better replicates the original (non devm) functionality, see below.

I didn't, however, add it to the documentation. +1 on that.

Can you include that oneliner in your patch then to reduce problems?

Yours,
Linus Walleij

#6 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

Quoted 9 lines · Linus Walleij
Quoted 4 lines · Rob Jones

Please note that I submitted a patch on 02/07/14 to create this function which was acked by Linus Walleij on 05/07/14.

Great minds think alike, and all that.

My mind certainly isn't any great :-(

I doubt that :-)

Quoted 4 lines

My left hand seems to be unaware of what the right hand is doing.

Did I ACK that for merging through some other tree then?

You did: https://lkml.org/lkml/2014/7/4/715

Quoted 3 lines

And I guess if Himangi want to submit these ASoC patches, they will have to go through the same tree as those patches in that case?

I don't know enough to comment.

Quoted 2 lines

And would you consider implementing a gpiod version...?

I will certainly consider it. I'm in the middle of something else right now but I should be available in a day or two and I'll have a look.

Quoted 8 lines
Quoted 4 lines

However, I think that the version I submitted better replicates the original (non devm) functionality, see below.

I didn't, however, add it to the documentation. +1 on that.

Can you include that oneliner in your patch then to reduce problems?

Certainly, with acknowledgement to Himangi Saraogi. Should I resubmit the patch series with amendment or should I put it in as a separate patch? Sorry for the noobie question but I *am* new to the kernel lists.

Quoted 4 lines

Yours,
Linus Walleij

Signature · 4 lines
Rob Jones
Codethink Ltd
mailto:[email protected]
tel:+44 161 236 5575
#7 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

Hello Rob,

Quoted 31 lines · Rob Jones
Quoted 4 lines · Linus Walleij

On Wed, Jul 9, 2014 at 1:18 PM, Rob Jones <[email protected]> wrote:

Quoted 8 lines
Quoted 4 lines

Please note that I submitted a patch on 02/07/14 to create this function which was acked by Linus Walleij on 05/07/14.

Great minds think alike, and all that.

My mind certainly isn't any great :-(

I doubt that :-)

Quoted 4 lines

My left hand seems to be unaware of what the right hand is doing.

Did I ACK that for merging through some other tree then?

You did: https://lkml.org/lkml/2014/7/4/715

Quoted 3 lines

And I guess if Himangi want to submit these ASoC patches, they will have to go through the same tree as those patches in that case?

Quoted 10 lines

I don't know enough to comment.

Quoted 2 lines

And would you consider implementing a gpiod version...?

I will certainly consider it. I'm in the middle of something else right now but I should be available in a day or two and I'll have a look.

I'm working on a driver for a PMIC which uses a set of GPIO to select a particular register. Right now I'm getting each GPIO independently but Linus mentioned [0] the devm_gpio_request_array() patch you posted.

Now, I'm not using the integer-based GPIO API but the new descriptor-based one so I was wondering if you are already implementing a devm_gpiod_get_array() or if you want me to implement it myself.

Best regards,
Javier

[0]: https://lkml.org/lkml/2014/7/10/166

#8 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

Quoted 3 lines · Javier Martinez Canillas

Hello Rob,

On Thu, Jul 10, 2014 at 1:01 PM, Rob Jones <[email protected]> wrote:

<snip>

Quoted 11 lines
Quoted 5 lines

I will certainly consider it. I'm in the middle of something else right now but I should be available in a day or two and I'll have a look.

I'm working on a driver for a PMIC which uses a set of GPIO to select a particular register. Right now I'm getting each GPIO independently but Linus mentioned [0] the devm_gpio_request_array() patch you posted.

Quoted 5 lines

Now, I'm not using the integer-based GPIO API but the new descriptor-based one so I was wondering if you are already implementing a devm_gpiod_get_array() or if you want me to implement it myself.

As I said, I'm deep in something else for the next day or two so if you need it urgently you should probably do it yourself but if you don't mind waiting until next week, I can have a go.

Your call, let me know.

Quoted 9 lines

Best regards,
Javier

[0]: https://lkml.org/lkml/2014/7/10/166
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 4 lines
Rob Jones
Codethink Ltd
mailto:[email protected]
tel:+44 161 236 5575
#9 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

Hello Rob,

Quoted 30 lines · Rob Jones
Quoted 5 lines · Javier Martinez Canillas

Hello Rob,

On Thu, Jul 10, 2014 at 1:01 PM, Rob Jones <[email protected]> wrote:

<snip>

Quoted 11 lines
Quoted 5 lines

I will certainly consider it. I'm in the middle of something else right now but I should be available in a day or two and I'll have a look.

I'm working on a driver for a PMIC which uses a set of GPIO to select a particular register. Right now I'm getting each GPIO independently but Linus mentioned [0] the devm_gpio_request_array() patch you posted.

Quoted 5 lines

Now, I'm not using the integer-based GPIO API but the new descriptor-based one so I was wondering if you are already implementing a devm_gpiod_get_array() or if you want me to implement it myself.

Quoted 6 lines

As I said, I'm deep in something else for the next day or two so if you need it urgently you should probably do it yourself but if you don't mind waiting until next week, I can have a go.

Your call, let me know.

I'm not in a hurry, just wanted to know if it was on your plate. I'll wait for your patch then, thanks!

Best regards,
Javier

#10 lore raw

Re: [PATCH 1/5] gpiolib: devres: Introduce the function devm_request_gpio_array

I'm afraid too many other things have been landing on my plate and I don't think I will be able to get on this for the foreseeable future, sorry about this.

Quoted 47 lines · Javier Martinez Canillas

Hello Rob,

Quoted 30 lines · Rob Jones
Quoted 5 lines · Javier Martinez Canillas

Hello Rob,

On Thu, Jul 10, 2014 at 1:01 PM, Rob Jones <[email protected]> wrote:

<snip>

Quoted 11 lines
Quoted 5 lines

I will certainly consider it. I'm in the middle of something else right now but I should be available in a day or two and I'll have a look.

I'm working on a driver for a PMIC which uses a set of GPIO to select a particular register. Right now I'm getting each GPIO independently but Linus mentioned [0] the devm_gpio_request_array() patch you posted.

Quoted 5 lines

Now, I'm not using the integer-based GPIO API but the new descriptor-based one so I was wondering if you are already implementing a devm_gpiod_get_array() or if you want me to implement it myself.

Quoted 6 lines

As I said, I'm deep in something else for the next day or two so if you need it urgently you should probably do it yourself but if you don't mind waiting until next week, I can have a go.

Your call, let me know.

I'm not in a hurry, just wanted to know if it was on your plate. I'll wait for your patch then, thanks!

Best regards,
Javier

Signature · 4 lines
Rob Jones
Codethink Ltd
mailto:[email protected]
tel:+44 161 236 5575