All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs
@ 2015-06-20  7:39 Axel Lin
  2015-07-15  7:04 ` Axel Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2015-06-20  7:39 UTC (permalink / raw
  To: Kishon Vijay Abraham I, Felipe Balbi
  Cc: Kishon Vijay Abraham I, Felipe Balbi, Heikki Krogerus,
	David Cohen, linux-kernel, linux-usb@vger.kernel.org

Also simplify the code a bit by specify direction and initial value for
output in devm_gpiod_get_optional function.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
---
Hi
This patch was sent on https://lkml.org/lkml/2015/5/31/221 with ACKs.
It's still not in linux-next, so here is a resend.

 drivers/phy/phy-tusb1210.c | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/drivers/phy/phy-tusb1210.c b/drivers/phy/phy-tusb1210.c
index 07efdd3..e0174da 100644
--- a/drivers/phy/phy-tusb1210.c
+++ b/drivers/phy/phy-tusb1210.c
@@ -61,32 +61,24 @@ static struct phy_ops phy_ops = {
 
 static int tusb1210_probe(struct ulpi *ulpi)
 {
-	struct gpio_desc *gpio;
 	struct tusb1210 *tusb;
 	u8 val, reg;
-	int ret;
 
 	tusb = devm_kzalloc(&ulpi->dev, sizeof(*tusb), GFP_KERNEL);
 	if (!tusb)
 		return -ENOMEM;
 
-	gpio = devm_gpiod_get(&ulpi->dev, "reset");
-	if (!IS_ERR(gpio)) {
-		ret = gpiod_direction_output(gpio, 0);
-		if (ret)
-			return ret;
-		gpiod_set_value_cansleep(gpio, 1);
-		tusb->gpio_reset = gpio;
-	}
+	tusb->gpio_reset = devm_gpiod_get_optional(&ulpi->dev, "reset",
+						   GPIOD_OUT_LOW);
+	if (IS_ERR(tusb->gpio_reset))
+		return PTR_ERR(tusb->gpio_reset);
+	gpiod_set_value_cansleep(tusb->gpio_reset, 1);
 
-	gpio = devm_gpiod_get(&ulpi->dev, "cs");
-	if (!IS_ERR(gpio)) {
-		ret = gpiod_direction_output(gpio, 0);
-		if (ret)
-			return ret;
-		gpiod_set_value_cansleep(gpio, 1);
-		tusb->gpio_cs = gpio;
-	}
+	tusb->gpio_cs = devm_gpiod_get_optional(&ulpi->dev, "cs",
+						GPIOD_OUT_LOW);
+	if (IS_ERR(tusb->gpio_cs))
+		return PTR_ERR(tusb->gpio_cs);
+	gpiod_set_value_cansleep(tusb->gpio_cs, 1);
 
 	/*
 	 * VENDOR_SPECIFIC2 register in TUSB1210 can be used for configuring eye
-- 
2.1.0



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs
  2015-06-20  7:39 [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs Axel Lin
@ 2015-07-15  7:04 ` Axel Lin
  2015-07-15  8:15   ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2015-07-15  7:04 UTC (permalink / raw
  To: Kishon Vijay Abraham I, Felipe Balbi
  Cc: Heikki Krogerus, David Cohen, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org

2015-06-20 15:39 GMT+08:00 Axel Lin <axel.lin@ingics.com>:
> Also simplify the code a bit by specify direction and initial value for
> output in devm_gpiod_get_optional function.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> Hi
> This patch was sent on https://lkml.org/lkml/2015/5/31/221 with ACKs.
> It's still not in linux-next, so here is a resend.

Hi Kishon,
No response from Felipe.
The phy-tusb1210 driver is already in Linus' tree, maybe you can pick
up this patch.

Regards,
Axel

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

* Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs
  2015-07-15  7:04 ` Axel Lin
@ 2015-07-15  8:15   ` Kishon Vijay Abraham I
  2015-07-15  8:29     ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Kishon Vijay Abraham I @ 2015-07-15  8:15 UTC (permalink / raw
  To: Axel Lin, Felipe Balbi
  Cc: Heikki Krogerus, David Cohen, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, Uwe Kleine-König

Hi,

On Wednesday 15 July 2015 12:34 PM, Axel Lin wrote:
> 2015-06-20 15:39 GMT+08:00 Axel Lin <axel.lin@ingics.com>:
>> Also simplify the code a bit by specify direction and initial value for
>> output in devm_gpiod_get_optional function.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> Hi
>> This patch was sent on https://lkml.org/lkml/2015/5/31/221 with ACKs.
>> It's still not in linux-next, so here is a resend.
> 
> Hi Kishon,
> No response from Felipe.
> The phy-tusb1210 driver is already in Linus' tree, maybe you can pick
> up this patch.

A similar patch was done by Uwe [1]. But since you've sent this patch before
Uwe, IMO your patch must be merged.

Uwe,
How do you want this patch to be merged. Is it okay If I take this in PHY tree?
Can you give your Acked-by?

Thanks
Kishon

[1] -> https://www.mail-archive.com/linux-media@vger.kernel.org/msg90203.html
> 
> Regards,
> Axel
> 

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

* Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs
  2015-07-15  8:15   ` Kishon Vijay Abraham I
@ 2015-07-15  8:29     ` Uwe Kleine-König
  2015-07-15  8:35       ` Axel Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2015-07-15  8:29 UTC (permalink / raw
  To: Kishon Vijay Abraham I
  Cc: Axel Lin, Felipe Balbi, Heikki Krogerus, David Cohen,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Linus Walleij

Hello,

On Wed, Jul 15, 2015 at 01:45:44PM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On Wednesday 15 July 2015 12:34 PM, Axel Lin wrote:
> > 2015-06-20 15:39 GMT+08:00 Axel Lin <axel.lin@ingics.com>:
> >> Also simplify the code a bit by specify direction and initial value for
> >> output in devm_gpiod_get_optional function.
> >>
> >> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> >> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> >> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> >> ---
> >> Hi
> >> This patch was sent on https://lkml.org/lkml/2015/5/31/221 with ACKs.
> >> It's still not in linux-next, so here is a resend.
> > 
> > Hi Kishon,
> > No response from Felipe.
> > The phy-tusb1210 driver is already in Linus' tree, maybe you can pick
> > up this patch.
> 
> A similar patch was done by Uwe [1]. But since you've sent this patch before
> Uwe, IMO your patch must be merged.
> 
> Uwe,
> How do you want this patch to be merged. Is it okay If I take this in PHY tree?
> Can you give your Acked-by?
I intend to change the gpiod functions to make the flags mandatory
for 4.3. I already sent the respective change to Linus Walleij to pull
for next and my commit to fix phy-tusb1210 is included to not break this
driver.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs
  2015-07-15  8:29     ` Uwe Kleine-König
@ 2015-07-15  8:35       ` Axel Lin
  0 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2015-07-15  8:35 UTC (permalink / raw
  To: Uwe Kleine-König
  Cc: Kishon Vijay Abraham I, Felipe Balbi, Heikki Krogerus,
	David Cohen, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, Linus Walleij

2015-07-15 16:29 GMT+08:00 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hello,
>
> On Wed, Jul 15, 2015 at 01:45:44PM +0530, Kishon Vijay Abraham I wrote:
>> Hi,
>>
>> On Wednesday 15 July 2015 12:34 PM, Axel Lin wrote:
>> > 2015-06-20 15:39 GMT+08:00 Axel Lin <axel.lin@ingics.com>:
>> >> Also simplify the code a bit by specify direction and initial value for
>> >> output in devm_gpiod_get_optional function.
>> >>
>> >> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> >> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>> >> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
>> >> ---
>> >> Hi
>> >> This patch was sent on https://lkml.org/lkml/2015/5/31/221 with ACKs.
>> >> It's still not in linux-next, so here is a resend.
>> >
>> > Hi Kishon,
>> > No response from Felipe.
>> > The phy-tusb1210 driver is already in Linus' tree, maybe you can pick
>> > up this patch.
>>
>> A similar patch was done by Uwe [1]. But since you've sent this patch before
>> Uwe, IMO your patch must be merged.
>>
>> Uwe,
>> How do you want this patch to be merged. Is it okay If I take this in PHY tree?
>> Can you give your Acked-by?
> I intend to change the gpiod functions to make the flags mandatory
> for 4.3. I already sent the respective change to Linus Walleij to pull
> for next and my commit to fix phy-tusb1210 is included to not break this
> driver.

I'm fine to just apply Uwe's patch if it make things easier.

Axel

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

end of thread, other threads:[~2015-07-15  8:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-20  7:39 [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs Axel Lin
2015-07-15  7:04 ` Axel Lin
2015-07-15  8:15   ` Kishon Vijay Abraham I
2015-07-15  8:29     ` Uwe Kleine-König
2015-07-15  8:35       ` Axel Lin

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.