All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm: beaglex15: fix USB Gadget
@ 2015-11-12 17:52 ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:52 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Hi,

with the following patches I can get USB Gadget working
with my beagle x15 with today's Linus' tree.

regards

Felipe Balbi (2):
  arm: boot: dts: beaglex15: Remove ID GPIO
  arm: boot: beaglex15: pass correct interrupt

 arch/arm/boot/dts/am57xx-beagle-x15.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.6.2


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

* [PATCH 0/2] arm: beaglex15: fix USB Gadget
@ 2015-11-12 17:52 ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:52 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

Hi,

with the following patches I can get USB Gadget working
with my beagle x15 with today's Linus' tree.

regards

Felipe Balbi (2):
  arm: boot: dts: beaglex15: Remove ID GPIO
  arm: boot: beaglex15: pass correct interrupt

 arch/arm/boot/dts/am57xx-beagle-x15.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.6.2

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

* [PATCH 0/2] arm: beaglex15: fix USB Gadget
@ 2015-11-12 17:52 ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

with the following patches I can get USB Gadget working
with my beagle x15 with today's Linus' tree.

regards

Felipe Balbi (2):
  arm: boot: dts: beaglex15: Remove ID GPIO
  arm: boot: beaglex15: pass correct interrupt

 arch/arm/boot/dts/am57xx-beagle-x15.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.6.2

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

* [PATCH 1/2] arm: boot: dts: beaglex15: Remove ID GPIO
  2015-11-12 17:52 ` Felipe Balbi
  (?)
@ 2015-11-12 17:53   ` Felipe Balbi
  -1 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:53 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

According to latest schematics [1], this board
leaves ID pin floating. It's not connected to
anything at all.

So let's remove it.

[1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 00352e761b8c..6f3a1a7ec5f9 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -560,8 +560,6 @@
 		extcon_usb2: tps659038_usb {
 			compatible = "ti,palmas-usb-vid";
 			ti,enable-vbus-detection;
-			ti,enable-id-detection;
-			id-gpios = <&gpio7 24 GPIO_ACTIVE_HIGH>;
 		};
 
 	};
-- 
2.6.2


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

* [PATCH 1/2] arm: boot: dts: beaglex15: Remove ID GPIO
@ 2015-11-12 17:53   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:53 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

According to latest schematics [1], this board
leaves ID pin floating. It's not connected to
anything at all.

So let's remove it.

[1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 00352e761b8c..6f3a1a7ec5f9 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -560,8 +560,6 @@
 		extcon_usb2: tps659038_usb {
 			compatible = "ti,palmas-usb-vid";
 			ti,enable-vbus-detection;
-			ti,enable-id-detection;
-			id-gpios = <&gpio7 24 GPIO_ACTIVE_HIGH>;
 		};
 
 	};
-- 
2.6.2

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

* [PATCH 1/2] arm: boot: dts: beaglex15: Remove ID GPIO
@ 2015-11-12 17:53   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

According to latest schematics [1], this board
leaves ID pin floating. It's not connected to
anything at all.

So let's remove it.

[1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 00352e761b8c..6f3a1a7ec5f9 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -560,8 +560,6 @@
 		extcon_usb2: tps659038_usb {
 			compatible = "ti,palmas-usb-vid";
 			ti,enable-vbus-detection;
-			ti,enable-id-detection;
-			id-gpios = <&gpio7 24 GPIO_ACTIVE_HIGH>;
 		};
 
 	};
-- 
2.6.2

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

* [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
  2015-11-12 17:52 ` Felipe Balbi
  (?)
@ 2015-11-12 17:53   ` Felipe Balbi
  -1 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:53 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

According to latest schematics [1], GPIO_1/VBUSDET
on TPS659038 is tied to AM57x GPIO4_21. We can use
that as a VBUS interrupt, instead of relying on
PMIC's VBUS interrupts which don't seem to be firing
on x15 at all.

A follow up patch will add support for using this
GPIO-based interrupt mechanism for notifying about
VBUS.

[1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 6f3a1a7ec5f9..5e47162f7883 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -560,6 +560,7 @@
 		extcon_usb2: tps659038_usb {
 			compatible = "ti,palmas-usb-vid";
 			ti,enable-vbus-detection;
+			interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
 		};
 
 	};
-- 
2.6.2


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

* [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-12 17:53   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:53 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

According to latest schematics [1], GPIO_1/VBUSDET
on TPS659038 is tied to AM57x GPIO4_21. We can use
that as a VBUS interrupt, instead of relying on
PMIC's VBUS interrupts which don't seem to be firing
on x15 at all.

A follow up patch will add support for using this
GPIO-based interrupt mechanism for notifying about
VBUS.

[1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 6f3a1a7ec5f9..5e47162f7883 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -560,6 +560,7 @@
 		extcon_usb2: tps659038_usb {
 			compatible = "ti,palmas-usb-vid";
 			ti,enable-vbus-detection;
+			interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
 		};
 
 	};
-- 
2.6.2

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

* [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-12 17:53   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

According to latest schematics [1], GPIO_1/VBUSDET
on TPS659038 is tied to AM57x GPIO4_21. We can use
that as a VBUS interrupt, instead of relying on
PMIC's VBUS interrupts which don't seem to be firing
on x15 at all.

A follow up patch will add support for using this
GPIO-based interrupt mechanism for notifying about
VBUS.

[1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 6f3a1a7ec5f9..5e47162f7883 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -560,6 +560,7 @@
 		extcon_usb2: tps659038_usb {
 			compatible = "ti,palmas-usb-vid";
 			ti,enable-vbus-detection;
+			interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
 		};
 
 	};
-- 
2.6.2

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

* Re: [PATCH 0/2] arm: beaglex15: fix USB Gadget
  2015-11-12 17:52 ` Felipe Balbi
  (?)
@ 2015-11-12 17:54   ` Felipe Balbi
  -1 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:54 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

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


Hi,

Felipe Balbi <balbi@ti.com> writes:
> Hi,
>
> with the following patches I can get USB Gadget working
> with my beagle x15 with today's Linus' tree.
>
> regards
>
> Felipe Balbi (2):
>   arm: boot: dts: beaglex15: Remove ID GPIO
>   arm: boot: beaglex15: pass correct interrupt

actually, one patch missing. Didn't generate it with format-patch. I'll
send as a reply to this thread.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH 0/2] arm: beaglex15: fix USB Gadget
@ 2015-11-12 17:54   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:54 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

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


Hi,

Felipe Balbi <balbi@ti.com> writes:
> Hi,
>
> with the following patches I can get USB Gadget working
> with my beagle x15 with today's Linus' tree.
>
> regards
>
> Felipe Balbi (2):
>   arm: boot: dts: beaglex15: Remove ID GPIO
>   arm: boot: beaglex15: pass correct interrupt

actually, one patch missing. Didn't generate it with format-patch. I'll
send as a reply to this thread.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* [PATCH 0/2] arm: beaglex15: fix USB Gadget
@ 2015-11-12 17:54   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:54 UTC (permalink / raw)
  To: linux-arm-kernel


Hi,

Felipe Balbi <balbi@ti.com> writes:
> Hi,
>
> with the following patches I can get USB Gadget working
> with my beagle x15 with today's Linus' tree.
>
> regards
>
> Felipe Balbi (2):
>   arm: boot: dts: beaglex15: Remove ID GPIO
>   arm: boot: beaglex15: pass correct interrupt

actually, one patch missing. Didn't generate it with format-patch. I'll
send as a reply to this thread.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151112/5fcb99a2/attachment-0001.sig>

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-12 17:52 ` Felipe Balbi
  (?)
@ 2015-11-12 17:57   ` Felipe Balbi
  -1 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:57 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

TPS659038 can remux its GPIO_1 as VBUSDET output,
which can be tied to a SoC GPIO and used as a VBUS
interrupt.

Beagle X15 uses that, in fact, and without it, I
could not get USB peripheral working with that
board.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a885740..7985d092c069 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
 	}
 
 	if (palmas_usb->enable_vbus_detection) {
+		int irq = platform_get_irq(pdev, 0);
+
+		if (irq > 0) {
+			/* remux GPIO_1 as VBUSDET */
+			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
+					PALMAS_PRIMARY_SECONDARY_PAD1,
+					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+					(1 << 3));
+			if (status < 0) {
+				dev_err(&pdev->dev, "can't remux GPIO1\n");
+				return status;
+			}
+
+			palmas_usb->vbus_irq = irq;
+		} else {
+			irq = regmap_irq_get_virq(palmas->irq_data,
+					PALMAS_VBUS_IRQ);
+			palmas_usb->vbus_irq = irq;
+		}
+
 		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
 						       PALMAS_VBUS_OTG_IRQ);
-		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
-							   PALMAS_VBUS_IRQ);
 		status = devm_request_threaded_irq(palmas_usb->dev,
 				palmas_usb->vbus_irq, NULL,
 				palmas_vbus_irq_handler,
-- 
2.6.2


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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-12 17:57   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:57 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, MyungJoo Ham, Chanwoo Choi
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List, Felipe Balbi

TPS659038 can remux its GPIO_1 as VBUSDET output,
which can be tied to a SoC GPIO and used as a VBUS
interrupt.

Beagle X15 uses that, in fact, and without it, I
could not get USB peripheral working with that
board.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a885740..7985d092c069 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
 	}
 
 	if (palmas_usb->enable_vbus_detection) {
+		int irq = platform_get_irq(pdev, 0);
+
+		if (irq > 0) {
+			/* remux GPIO_1 as VBUSDET */
+			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
+					PALMAS_PRIMARY_SECONDARY_PAD1,
+					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+					(1 << 3));
+			if (status < 0) {
+				dev_err(&pdev->dev, "can't remux GPIO1\n");
+				return status;
+			}
+
+			palmas_usb->vbus_irq = irq;
+		} else {
+			irq = regmap_irq_get_virq(palmas->irq_data,
+					PALMAS_VBUS_IRQ);
+			palmas_usb->vbus_irq = irq;
+		}
+
 		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
 						       PALMAS_VBUS_OTG_IRQ);
-		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
-							   PALMAS_VBUS_IRQ);
 		status = devm_request_threaded_irq(palmas_usb->dev,
 				palmas_usb->vbus_irq, NULL,
 				palmas_vbus_irq_handler,
-- 
2.6.2

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-12 17:57   ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-12 17:57 UTC (permalink / raw)
  To: linux-arm-kernel

TPS659038 can remux its GPIO_1 as VBUSDET output,
which can be tied to a SoC GPIO and used as a VBUS
interrupt.

Beagle X15 uses that, in fact, and without it, I
could not get USB peripheral working with that
board.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a885740..7985d092c069 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
 	}
 
 	if (palmas_usb->enable_vbus_detection) {
+		int irq = platform_get_irq(pdev, 0);
+
+		if (irq > 0) {
+			/* remux GPIO_1 as VBUSDET */
+			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
+					PALMAS_PRIMARY_SECONDARY_PAD1,
+					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+					(1 << 3));
+			if (status < 0) {
+				dev_err(&pdev->dev, "can't remux GPIO1\n");
+				return status;
+			}
+
+			palmas_usb->vbus_irq = irq;
+		} else {
+			irq = regmap_irq_get_virq(palmas->irq_data,
+					PALMAS_VBUS_IRQ);
+			palmas_usb->vbus_irq = irq;
+		}
+
 		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
 						       PALMAS_VBUS_OTG_IRQ);
-		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
-							   PALMAS_VBUS_IRQ);
 		status = devm_request_threaded_irq(palmas_usb->dev,
 				palmas_usb->vbus_irq, NULL,
 				palmas_vbus_irq_handler,
-- 
2.6.2

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-12 17:57   ` Felipe Balbi
  (?)
@ 2015-11-20  5:33     ` Chanwoo Choi
  -1 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:33 UTC (permalink / raw)
  To: Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

Looks good to me. But I have one comment.

On 2015년 11월 13일 02:57, Felipe Balbi wrote:
> TPS659038 can remux its GPIO_1 as VBUSDET output,
> which can be tied to a SoC GPIO and used as a VBUS
> interrupt.
> 
> Beagle X15 uses that, in fact, and without it, I
> could not get USB peripheral working with that
> board.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index 93c30a885740..7985d092c069 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>  	}
>  
>  	if (palmas_usb->enable_vbus_detection) {
> +		int irq = platform_get_irq(pdev, 0);
> +
> +		if (irq > 0) {
> +			/* remux GPIO_1 as VBUSDET */
> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
> +					PALMAS_PRIMARY_SECONDARY_PAD1,
> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
> +					(1 << 3));

PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of using '3'.
Also, I don't recommend the over line 80. The everything else is good


> +			if (status < 0) {
> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
> +				return status;
> +			}
> +
> +			palmas_usb->vbus_irq = irq;
> +		} else {
> +			irq = regmap_irq_get_virq(palmas->irq_data,
> +					PALMAS_VBUS_IRQ);
> +			palmas_usb->vbus_irq = irq;
> +		}
> +
>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>  						       PALMAS_VBUS_OTG_IRQ);
> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
> -							   PALMAS_VBUS_IRQ);
>  		status = devm_request_threaded_irq(palmas_usb->dev,
>  				palmas_usb->vbus_irq, NULL,
>  				palmas_vbus_irq_handler,
> 

Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20  5:33     ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:33 UTC (permalink / raw)
  To: Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

Looks good to me. But I have one comment.

On 2015년 11월 13일 02:57, Felipe Balbi wrote:
> TPS659038 can remux its GPIO_1 as VBUSDET output,
> which can be tied to a SoC GPIO and used as a VBUS
> interrupt.
> 
> Beagle X15 uses that, in fact, and without it, I
> could not get USB peripheral working with that
> board.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index 93c30a885740..7985d092c069 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>  	}
>  
>  	if (palmas_usb->enable_vbus_detection) {
> +		int irq = platform_get_irq(pdev, 0);
> +
> +		if (irq > 0) {
> +			/* remux GPIO_1 as VBUSDET */
> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
> +					PALMAS_PRIMARY_SECONDARY_PAD1,
> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
> +					(1 << 3));

PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of using '3'.
Also, I don't recommend the over line 80. The everything else is good


> +			if (status < 0) {
> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
> +				return status;
> +			}
> +
> +			palmas_usb->vbus_irq = irq;
> +		} else {
> +			irq = regmap_irq_get_virq(palmas->irq_data,
> +					PALMAS_VBUS_IRQ);
> +			palmas_usb->vbus_irq = irq;
> +		}
> +
>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>  						       PALMAS_VBUS_OTG_IRQ);
> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
> -							   PALMAS_VBUS_IRQ);
>  		status = devm_request_threaded_irq(palmas_usb->dev,
>  				palmas_usb->vbus_irq, NULL,
>  				palmas_vbus_irq_handler,
> 

Thanks,
Chanwoo Choi

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20  5:33     ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Felipe,

Looks good to me. But I have one comment.

On 2015? 11? 13? 02:57, Felipe Balbi wrote:
> TPS659038 can remux its GPIO_1 as VBUSDET output,
> which can be tied to a SoC GPIO and used as a VBUS
> interrupt.
> 
> Beagle X15 uses that, in fact, and without it, I
> could not get USB peripheral working with that
> board.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index 93c30a885740..7985d092c069 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>  	}
>  
>  	if (palmas_usb->enable_vbus_detection) {
> +		int irq = platform_get_irq(pdev, 0);
> +
> +		if (irq > 0) {
> +			/* remux GPIO_1 as VBUSDET */
> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
> +					PALMAS_PRIMARY_SECONDARY_PAD1,
> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
> +					(1 << 3));

PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of using '3'.
Also, I don't recommend the over line 80. The everything else is good


> +			if (status < 0) {
> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
> +				return status;
> +			}
> +
> +			palmas_usb->vbus_irq = irq;
> +		} else {
> +			irq = regmap_irq_get_virq(palmas->irq_data,
> +					PALMAS_VBUS_IRQ);
> +			palmas_usb->vbus_irq = irq;
> +		}
> +
>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>  						       PALMAS_VBUS_OTG_IRQ);
> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
> -							   PALMAS_VBUS_IRQ);
>  		status = devm_request_threaded_irq(palmas_usb->dev,
>  				palmas_usb->vbus_irq, NULL,
>  				palmas_vbus_irq_handler,
> 

Thanks,
Chanwoo Choi

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

* Re: [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
  2015-11-12 17:53   ` Felipe Balbi
  (?)
@ 2015-11-20  5:39     ` Chanwoo Choi
  -1 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:39 UTC (permalink / raw)
  To: Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi,

On 2015년 11월 13일 02:53, Felipe Balbi wrote:
> According to latest schematics [1], GPIO_1/VBUSDET
> on TPS659038 is tied to AM57x GPIO4_21. We can use
> that as a VBUS interrupt, instead of relying on
> PMIC's VBUS interrupts which don't seem to be firing
> on x15 at all.
> 
> A follow up patch will add support for using this
> GPIO-based interrupt mechanism for notifying about
> VBUS.
> 
> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> index 6f3a1a7ec5f9..5e47162f7883 100644
> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> @@ -560,6 +560,7 @@
>  		extcon_usb2: tps659038_usb {
>  			compatible = "ti,palmas-usb-vid";
>  			ti,enable-vbus-detection;
> +			interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
>  		};
>  
>  	};
> 

I check the schematic file. The GPIO4_21 pin is connected as following:
- GPIO_1/VBUSDET -> PMIC_VBUS_DET -> VBUS_DET -> AM5728 GPIO4_21 pin

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

Thanks,
Chanwoo Choi

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

* Re: [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-20  5:39     ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:39 UTC (permalink / raw)
  To: Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi,

On 2015년 11월 13일 02:53, Felipe Balbi wrote:
> According to latest schematics [1], GPIO_1/VBUSDET
> on TPS659038 is tied to AM57x GPIO4_21. We can use
> that as a VBUS interrupt, instead of relying on
> PMIC's VBUS interrupts which don't seem to be firing
> on x15 at all.
> 
> A follow up patch will add support for using this
> GPIO-based interrupt mechanism for notifying about
> VBUS.
> 
> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> index 6f3a1a7ec5f9..5e47162f7883 100644
> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> @@ -560,6 +560,7 @@
>  		extcon_usb2: tps659038_usb {
>  			compatible = "ti,palmas-usb-vid";
>  			ti,enable-vbus-detection;
> +			interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
>  		};
>  
>  	};
> 

I check the schematic file. The GPIO4_21 pin is connected as following:
- GPIO_1/VBUSDET -> PMIC_VBUS_DET -> VBUS_DET -> AM5728 GPIO4_21 pin

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

Thanks,
Chanwoo Choi

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

* [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-20  5:39     ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 2015? 11? 13? 02:53, Felipe Balbi wrote:
> According to latest schematics [1], GPIO_1/VBUSDET
> on TPS659038 is tied to AM57x GPIO4_21. We can use
> that as a VBUS interrupt, instead of relying on
> PMIC's VBUS interrupts which don't seem to be firing
> on x15 at all.
> 
> A follow up patch will add support for using this
> GPIO-based interrupt mechanism for notifying about
> VBUS.
> 
> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> index 6f3a1a7ec5f9..5e47162f7883 100644
> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> @@ -560,6 +560,7 @@
>  		extcon_usb2: tps659038_usb {
>  			compatible = "ti,palmas-usb-vid";
>  			ti,enable-vbus-detection;
> +			interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
>  		};
>  
>  	};
> 

I check the schematic file. The GPIO4_21 pin is connected as following:
- GPIO_1/VBUSDET -> PMIC_VBUS_DET -> VBUS_DET -> AM5728 GPIO4_21 pin

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-20  5:33     ` Chanwoo Choi
  (?)
@ 2015-11-20  5:44       ` Chanwoo Choi
  -1 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:44 UTC (permalink / raw)
  To: Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
> Hi Felipe,
> 
> Looks good to me. But I have one comment.
> 
> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>> which can be tied to a SoC GPIO and used as a VBUS
>> interrupt.
>>
>> Beagle X15 uses that, in fact, and without it, I
>> could not get USB peripheral working with that
>> board.
>>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>> ---
>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>> index 93c30a885740..7985d092c069 100644
>> --- a/drivers/extcon/extcon-palmas.c
>> +++ b/drivers/extcon/extcon-palmas.c
>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>  	}
>>  
>>  	if (palmas_usb->enable_vbus_detection) {
>> +		int irq = platform_get_irq(pdev, 0);
>> +
>> +		if (irq > 0) {
>> +			/* remux GPIO_1 as VBUSDET */
>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>> +					(1 << 3));
> 
> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of using '3'.
> Also, I don't recommend the over line 80. The everything else is good
> 
> 
>> +			if (status < 0) {
>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>> +				return status;
>> +			}
>> +
>> +			palmas_usb->vbus_irq = irq;
>> +		} else {
>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>> +					PALMAS_VBUS_IRQ);
>> +			palmas_usb->vbus_irq = irq;
>> +		}
>> +
>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>  						       PALMAS_VBUS_OTG_IRQ);
>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>> -							   PALMAS_VBUS_IRQ);
>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>  				palmas_usb->vbus_irq, NULL,
>>  				palmas_vbus_irq_handler,
>>
> 
> Thanks,
> Chanwoo Choi
> --
> 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/
> 

If you are OK about following patch, I'll apply it on extcon branch.

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a885740..f601370c9466 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -296,10 +296,29 @@ static int palmas_usb_probe(struct platform_device *pdev)
 	}
 
 	if (palmas_usb->enable_vbus_detection) {
+		int irq = platform_get_irq(pdev, 0);
+
+		if (irq > 0) {
+			/* remux GPIO_1 as VBUSDET */
+			status = palmas_update_bits(palmas,
+				PALMAS_PU_PD_OD_BASE,
+				PALMAS_PRIMARY_SECONDARY_PAD1,
+				PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+				(1 << PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT));
+			if (status < 0) {
+				dev_err(&pdev->dev, "can't remux GPIO1\n");
+				return status;
+			}
+
+			palmas_usb->vbus_irq = irq;
+		} else {
+			irq = regmap_irq_get_virq(palmas->irq_data,
+					PALMAS_VBUS_IRQ);
+			palmas_usb->vbus_irq = irq;
+		}
+
 		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
 						       PALMAS_VBUS_OTG_IRQ);
-		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
-							   PALMAS_VBUS_IRQ);
 		status = devm_request_threaded_irq(palmas_usb->dev,
 				palmas_usb->vbus_irq, NULL,
 				palmas_vbus_irq_handler,
-- 
1.9.1


Thanks,
Chanwoo Choi


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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20  5:44       ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:44 UTC (permalink / raw)
  To: Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
> Hi Felipe,
> 
> Looks good to me. But I have one comment.
> 
> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>> which can be tied to a SoC GPIO and used as a VBUS
>> interrupt.
>>
>> Beagle X15 uses that, in fact, and without it, I
>> could not get USB peripheral working with that
>> board.
>>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>> ---
>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>> index 93c30a885740..7985d092c069 100644
>> --- a/drivers/extcon/extcon-palmas.c
>> +++ b/drivers/extcon/extcon-palmas.c
>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>  	}
>>  
>>  	if (palmas_usb->enable_vbus_detection) {
>> +		int irq = platform_get_irq(pdev, 0);
>> +
>> +		if (irq > 0) {
>> +			/* remux GPIO_1 as VBUSDET */
>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>> +					(1 << 3));
> 
> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of using '3'.
> Also, I don't recommend the over line 80. The everything else is good
> 
> 
>> +			if (status < 0) {
>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>> +				return status;
>> +			}
>> +
>> +			palmas_usb->vbus_irq = irq;
>> +		} else {
>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>> +					PALMAS_VBUS_IRQ);
>> +			palmas_usb->vbus_irq = irq;
>> +		}
>> +
>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>  						       PALMAS_VBUS_OTG_IRQ);
>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>> -							   PALMAS_VBUS_IRQ);
>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>  				palmas_usb->vbus_irq, NULL,
>>  				palmas_vbus_irq_handler,
>>
> 
> Thanks,
> Chanwoo Choi
> --
> 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/
> 

If you are OK about following patch, I'll apply it on extcon branch.

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a885740..f601370c9466 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -296,10 +296,29 @@ static int palmas_usb_probe(struct platform_device *pdev)
 	}
 
 	if (palmas_usb->enable_vbus_detection) {
+		int irq = platform_get_irq(pdev, 0);
+
+		if (irq > 0) {
+			/* remux GPIO_1 as VBUSDET */
+			status = palmas_update_bits(palmas,
+				PALMAS_PU_PD_OD_BASE,
+				PALMAS_PRIMARY_SECONDARY_PAD1,
+				PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+				(1 << PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT));
+			if (status < 0) {
+				dev_err(&pdev->dev, "can't remux GPIO1\n");
+				return status;
+			}
+
+			palmas_usb->vbus_irq = irq;
+		} else {
+			irq = regmap_irq_get_virq(palmas->irq_data,
+					PALMAS_VBUS_IRQ);
+			palmas_usb->vbus_irq = irq;
+		}
+
 		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
 						       PALMAS_VBUS_OTG_IRQ);
-		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
-							   PALMAS_VBUS_IRQ);
 		status = devm_request_threaded_irq(palmas_usb->dev,
 				palmas_usb->vbus_irq, NULL,
 				palmas_vbus_irq_handler,
-- 
1.9.1


Thanks,
Chanwoo Choi

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20  5:44       ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20  5:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Felipe,

On 2015? 11? 20? 14:33, Chanwoo Choi wrote:
> Hi Felipe,
> 
> Looks good to me. But I have one comment.
> 
> On 2015? 11? 13? 02:57, Felipe Balbi wrote:
>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>> which can be tied to a SoC GPIO and used as a VBUS
>> interrupt.
>>
>> Beagle X15 uses that, in fact, and without it, I
>> could not get USB peripheral working with that
>> board.
>>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>> ---
>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>> index 93c30a885740..7985d092c069 100644
>> --- a/drivers/extcon/extcon-palmas.c
>> +++ b/drivers/extcon/extcon-palmas.c
>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>  	}
>>  
>>  	if (palmas_usb->enable_vbus_detection) {
>> +		int irq = platform_get_irq(pdev, 0);
>> +
>> +		if (irq > 0) {
>> +			/* remux GPIO_1 as VBUSDET */
>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>> +					(1 << 3));
> 
> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of using '3'.
> Also, I don't recommend the over line 80. The everything else is good
> 
> 
>> +			if (status < 0) {
>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>> +				return status;
>> +			}
>> +
>> +			palmas_usb->vbus_irq = irq;
>> +		} else {
>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>> +					PALMAS_VBUS_IRQ);
>> +			palmas_usb->vbus_irq = irq;
>> +		}
>> +
>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>  						       PALMAS_VBUS_OTG_IRQ);
>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>> -							   PALMAS_VBUS_IRQ);
>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>  				palmas_usb->vbus_irq, NULL,
>>  				palmas_vbus_irq_handler,
>>
> 
> Thanks,
> Chanwoo Choi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

If you are OK about following patch, I'll apply it on extcon branch.

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a885740..f601370c9466 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -296,10 +296,29 @@ static int palmas_usb_probe(struct platform_device *pdev)
 	}
 
 	if (palmas_usb->enable_vbus_detection) {
+		int irq = platform_get_irq(pdev, 0);
+
+		if (irq > 0) {
+			/* remux GPIO_1 as VBUSDET */
+			status = palmas_update_bits(palmas,
+				PALMAS_PU_PD_OD_BASE,
+				PALMAS_PRIMARY_SECONDARY_PAD1,
+				PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+				(1 << PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT));
+			if (status < 0) {
+				dev_err(&pdev->dev, "can't remux GPIO1\n");
+				return status;
+			}
+
+			palmas_usb->vbus_irq = irq;
+		} else {
+			irq = regmap_irq_get_virq(palmas->irq_data,
+					PALMAS_VBUS_IRQ);
+			palmas_usb->vbus_irq = irq;
+		}
+
 		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
 						       PALMAS_VBUS_OTG_IRQ);
-		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
-							   PALMAS_VBUS_IRQ);
 		status = devm_request_threaded_irq(palmas_usb->dev,
 				palmas_usb->vbus_irq, NULL,
 				palmas_vbus_irq_handler,
-- 
1.9.1


Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-20  5:44       ` Chanwoo Choi
  (?)
@ 2015-11-20 14:37         ` Felipe Balbi
  -1 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-20 14:37 UTC (permalink / raw)
  To: Chanwoo Choi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

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


Hi Chanwoo,

Chanwoo Choi <cw00.choi@samsung.com> writes:
> Hi Felipe,
>
> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>> Hi Felipe,
>> 
>> Looks good to me. But I have one comment.
>> 
>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>> which can be tied to a SoC GPIO and used as a VBUS
>>> interrupt.
>>>
>>> Beagle X15 uses that, in fact, and without it, I
>>> could not get USB peripheral working with that
>>> board.
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>> index 93c30a885740..7985d092c069 100644
>>> --- a/drivers/extcon/extcon-palmas.c
>>> +++ b/drivers/extcon/extcon-palmas.c
>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>  	}
>>>  
>>>  	if (palmas_usb->enable_vbus_detection) {
>>> +		int irq = platform_get_irq(pdev, 0);
>>> +
>>> +		if (irq > 0) {
>>> +			/* remux GPIO_1 as VBUSDET */
>>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>> +					(1 << 3));
>> 
>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>> using '3'.

good point :-)

>>> +			if (status < 0) {
>>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>>> +				return status;
>>> +			}
>>> +
>>> +			palmas_usb->vbus_irq = irq;
>>> +		} else {
>>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>>> +					PALMAS_VBUS_IRQ);
>>> +			palmas_usb->vbus_irq = irq;
>>> +		}
>>> +
>>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>  						       PALMAS_VBUS_OTG_IRQ);
>>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>> -							   PALMAS_VBUS_IRQ);
>>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>>  				palmas_usb->vbus_irq, NULL,
>>>  				palmas_vbus_irq_handler,
>>>
>> 
>> Thanks,
>> Chanwoo Choi
>> --
>> 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/
>> 
>
> If you are OK about following patch, I'll apply it on extcon branch.

that's perfect, thanks for fixing it :-)

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 14:37         ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-20 14:37 UTC (permalink / raw)
  To: Chanwoo Choi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux Kernel Mailing List,
	Linux ARM Kernel Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 2573 bytes --]


Hi Chanwoo,

Chanwoo Choi <cw00.choi@samsung.com> writes:
> Hi Felipe,
>
> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>> Hi Felipe,
>> 
>> Looks good to me. But I have one comment.
>> 
>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>> which can be tied to a SoC GPIO and used as a VBUS
>>> interrupt.
>>>
>>> Beagle X15 uses that, in fact, and without it, I
>>> could not get USB peripheral working with that
>>> board.
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>> index 93c30a885740..7985d092c069 100644
>>> --- a/drivers/extcon/extcon-palmas.c
>>> +++ b/drivers/extcon/extcon-palmas.c
>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>  	}
>>>  
>>>  	if (palmas_usb->enable_vbus_detection) {
>>> +		int irq = platform_get_irq(pdev, 0);
>>> +
>>> +		if (irq > 0) {
>>> +			/* remux GPIO_1 as VBUSDET */
>>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>> +					(1 << 3));
>> 
>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>> using '3'.

good point :-)

>>> +			if (status < 0) {
>>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>>> +				return status;
>>> +			}
>>> +
>>> +			palmas_usb->vbus_irq = irq;
>>> +		} else {
>>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>>> +					PALMAS_VBUS_IRQ);
>>> +			palmas_usb->vbus_irq = irq;
>>> +		}
>>> +
>>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>  						       PALMAS_VBUS_OTG_IRQ);
>>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>> -							   PALMAS_VBUS_IRQ);
>>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>>  				palmas_usb->vbus_irq, NULL,
>>>  				palmas_vbus_irq_handler,
>>>
>> 
>> Thanks,
>> Chanwoo Choi
>> --
>> 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/
>> 
>
> If you are OK about following patch, I'll apply it on extcon branch.

that's perfect, thanks for fixing it :-)

-- 
balbi

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 14:37         ` Felipe Balbi
  0 siblings, 0 replies; 42+ messages in thread
From: Felipe Balbi @ 2015-11-20 14:37 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Chanwoo,

Chanwoo Choi <cw00.choi@samsung.com> writes:
> Hi Felipe,
>
> On 2015? 11? 20? 14:33, Chanwoo Choi wrote:
>> Hi Felipe,
>> 
>> Looks good to me. But I have one comment.
>> 
>> On 2015? 11? 13? 02:57, Felipe Balbi wrote:
>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>> which can be tied to a SoC GPIO and used as a VBUS
>>> interrupt.
>>>
>>> Beagle X15 uses that, in fact, and without it, I
>>> could not get USB peripheral working with that
>>> board.
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>> index 93c30a885740..7985d092c069 100644
>>> --- a/drivers/extcon/extcon-palmas.c
>>> +++ b/drivers/extcon/extcon-palmas.c
>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>  	}
>>>  
>>>  	if (palmas_usb->enable_vbus_detection) {
>>> +		int irq = platform_get_irq(pdev, 0);
>>> +
>>> +		if (irq > 0) {
>>> +			/* remux GPIO_1 as VBUSDET */
>>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>> +					(1 << 3));
>> 
>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>> using '3'.

good point :-)

>>> +			if (status < 0) {
>>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>>> +				return status;
>>> +			}
>>> +
>>> +			palmas_usb->vbus_irq = irq;
>>> +		} else {
>>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>>> +					PALMAS_VBUS_IRQ);
>>> +			palmas_usb->vbus_irq = irq;
>>> +		}
>>> +
>>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>  						       PALMAS_VBUS_OTG_IRQ);
>>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>> -							   PALMAS_VBUS_IRQ);
>>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>>  				palmas_usb->vbus_irq, NULL,
>>>  				palmas_vbus_irq_handler,
>>>
>> 
>> Thanks,
>> Chanwoo Choi
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>> 
>
> If you are OK about following patch, I'll apply it on extcon branch.

that's perfect, thanks for fixing it :-)

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151120/181f39e7/attachment.sig>

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-20 14:37         ` Felipe Balbi
  (?)
@ 2015-11-20 15:05           ` Chanwoo Choi
  -1 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 15:05 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Tony Lindgren, Rob Herring, MyungJoo Ham,
	Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

On Fri, Nov 20, 2015 at 11:37 PM, Felipe Balbi <balbi@ti.com> wrote:
>
> Hi Chanwoo,
>
> Chanwoo Choi <cw00.choi@samsung.com> writes:
>> Hi Felipe,
>>
>> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>>> Hi Felipe,
>>>
>>> Looks good to me. But I have one comment.
>>>
>>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>> interrupt.
>>>>
>>>> Beagle X15 uses that, in fact, and without it, I
>>>> could not get USB peripheral working with that
>>>> board.
>>>>
>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>> ---
>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>> index 93c30a885740..7985d092c069 100644
>>>> --- a/drivers/extcon/extcon-palmas.c
>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>     }
>>>>
>>>>     if (palmas_usb->enable_vbus_detection) {
>>>> +           int irq = platform_get_irq(pdev, 0);
>>>> +
>>>> +           if (irq > 0) {
>>>> +                   /* remux GPIO_1 as VBUSDET */
>>>> +                   status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1,
>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>> +                                   (1 << 3));
>>>
>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>> using '3'.
>
> good point :-)
>
>>>> +                   if (status < 0) {
>>>> +                           dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>> +                           return status;
>>>> +                   }
>>>> +
>>>> +                   palmas_usb->vbus_irq = irq;
>>>> +           } else {
>>>> +                   irq = regmap_irq_get_virq(palmas->irq_data,
>>>> +                                   PALMAS_VBUS_IRQ);
>>>> +                   palmas_usb->vbus_irq = irq;
>>>> +           }
>>>> +
>>>>             palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>                                                    PALMAS_VBUS_OTG_IRQ);
>>>> -           palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>> -                                                      PALMAS_VBUS_IRQ);
>>>>             status = devm_request_threaded_irq(palmas_usb->dev,
>>>>                             palmas_usb->vbus_irq, NULL,
>>>>                             palmas_vbus_irq_handler,
>>>>
>>>
>>> Thanks,
>>> Chanwoo Choi
>>> --
>>> 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/
>>>
>>
>> If you are OK about following patch, I'll apply it on extcon branch.
>
> that's perfect, thanks for fixing it :-)

Applied it.

Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 15:05           ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 15:05 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Tony Lindgren, Linux Kernel Mailing List, Rob Herring,
	MyungJoo Ham, Linux OMAP Mailing List,
	Linux ARM Kernel Mailing List

Hi Felipe,

On Fri, Nov 20, 2015 at 11:37 PM, Felipe Balbi <balbi@ti.com> wrote:
>
> Hi Chanwoo,
>
> Chanwoo Choi <cw00.choi@samsung.com> writes:
>> Hi Felipe,
>>
>> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>>> Hi Felipe,
>>>
>>> Looks good to me. But I have one comment.
>>>
>>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>> interrupt.
>>>>
>>>> Beagle X15 uses that, in fact, and without it, I
>>>> could not get USB peripheral working with that
>>>> board.
>>>>
>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>> ---
>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>> index 93c30a885740..7985d092c069 100644
>>>> --- a/drivers/extcon/extcon-palmas.c
>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>     }
>>>>
>>>>     if (palmas_usb->enable_vbus_detection) {
>>>> +           int irq = platform_get_irq(pdev, 0);
>>>> +
>>>> +           if (irq > 0) {
>>>> +                   /* remux GPIO_1 as VBUSDET */
>>>> +                   status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1,
>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>> +                                   (1 << 3));
>>>
>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>> using '3'.
>
> good point :-)
>
>>>> +                   if (status < 0) {
>>>> +                           dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>> +                           return status;
>>>> +                   }
>>>> +
>>>> +                   palmas_usb->vbus_irq = irq;
>>>> +           } else {
>>>> +                   irq = regmap_irq_get_virq(palmas->irq_data,
>>>> +                                   PALMAS_VBUS_IRQ);
>>>> +                   palmas_usb->vbus_irq = irq;
>>>> +           }
>>>> +
>>>>             palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>                                                    PALMAS_VBUS_OTG_IRQ);
>>>> -           palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>> -                                                      PALMAS_VBUS_IRQ);
>>>>             status = devm_request_threaded_irq(palmas_usb->dev,
>>>>                             palmas_usb->vbus_irq, NULL,
>>>>                             palmas_vbus_irq_handler,
>>>>
>>>
>>> Thanks,
>>> Chanwoo Choi
>>> --
>>> 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/
>>>
>>
>> If you are OK about following patch, I'll apply it on extcon branch.
>
> that's perfect, thanks for fixing it :-)

Applied it.

Thanks,
Chanwoo Choi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 15:05           ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Felipe,

On Fri, Nov 20, 2015 at 11:37 PM, Felipe Balbi <balbi@ti.com> wrote:
>
> Hi Chanwoo,
>
> Chanwoo Choi <cw00.choi@samsung.com> writes:
>> Hi Felipe,
>>
>> On 2015? 11? 20? 14:33, Chanwoo Choi wrote:
>>> Hi Felipe,
>>>
>>> Looks good to me. But I have one comment.
>>>
>>> On 2015? 11? 13? 02:57, Felipe Balbi wrote:
>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>> interrupt.
>>>>
>>>> Beagle X15 uses that, in fact, and without it, I
>>>> could not get USB peripheral working with that
>>>> board.
>>>>
>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>> ---
>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>> index 93c30a885740..7985d092c069 100644
>>>> --- a/drivers/extcon/extcon-palmas.c
>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>     }
>>>>
>>>>     if (palmas_usb->enable_vbus_detection) {
>>>> +           int irq = platform_get_irq(pdev, 0);
>>>> +
>>>> +           if (irq > 0) {
>>>> +                   /* remux GPIO_1 as VBUSDET */
>>>> +                   status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1,
>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>> +                                   (1 << 3));
>>>
>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>> using '3'.
>
> good point :-)
>
>>>> +                   if (status < 0) {
>>>> +                           dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>> +                           return status;
>>>> +                   }
>>>> +
>>>> +                   palmas_usb->vbus_irq = irq;
>>>> +           } else {
>>>> +                   irq = regmap_irq_get_virq(palmas->irq_data,
>>>> +                                   PALMAS_VBUS_IRQ);
>>>> +                   palmas_usb->vbus_irq = irq;
>>>> +           }
>>>> +
>>>>             palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>                                                    PALMAS_VBUS_OTG_IRQ);
>>>> -           palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>> -                                                      PALMAS_VBUS_IRQ);
>>>>             status = devm_request_threaded_irq(palmas_usb->dev,
>>>>                             palmas_usb->vbus_irq, NULL,
>>>>                             palmas_vbus_irq_handler,
>>>>
>>>
>>> Thanks,
>>> Chanwoo Choi
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>> the body of a message to majordomo at vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at  http://www.tux.org/lkml/
>>>
>>
>> If you are OK about following patch, I'll apply it on extcon branch.
>
> that's perfect, thanks for fixing it :-)

Applied it.

Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-20 14:37         ` Felipe Balbi
  (?)
@ 2015-11-20 16:34           ` Chanwoo Choi
  -1 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:34 UTC (permalink / raw)
  To: Felipe Balbi, Chanwoo Choi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

On 2015. 11. 20. 오후 11:37, Felipe Balbi wrote:
> 
> Hi Chanwoo,
> 
> Chanwoo Choi <cw00.choi@samsung.com> writes:
>> Hi Felipe,
>>
>> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>>> Hi Felipe,
>>>
>>> Looks good to me. But I have one comment.
>>>
>>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>> interrupt.
>>>>
>>>> Beagle X15 uses that, in fact, and without it, I
>>>> could not get USB peripheral working with that
>>>> board.
>>>>
>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>> ---
>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>> index 93c30a885740..7985d092c069 100644
>>>> --- a/drivers/extcon/extcon-palmas.c
>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>  	}
>>>>  
>>>>  	if (palmas_usb->enable_vbus_detection) {
>>>> +		int irq = platform_get_irq(pdev, 0);
>>>> +
>>>> +		if (irq > 0) {
>>>> +			/* remux GPIO_1 as VBUSDET */
>>>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>>>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>> +					(1 << 3));
>>>
>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>> using '3'.
> 
> good point :-)
> 
>>>> +			if (status < 0) {
>>>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>> +				return status;
>>>> +			}
>>>> +
>>>> +			palmas_usb->vbus_irq = irq;
>>>> +		} else {
>>>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>>>> +					PALMAS_VBUS_IRQ);
>>>> +			palmas_usb->vbus_irq = irq;
>>>> +		}
>>>> +
>>>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>  						       PALMAS_VBUS_OTG_IRQ);
>>>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>> -							   PALMAS_VBUS_IRQ);
>>>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>>>  				palmas_usb->vbus_irq, NULL,
>>>>  				palmas_vbus_irq_handler,
>>>>
>>>
>>> Thanks,
>>> Chanwoo Choi
>>> --
>>> 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/
>>>
>>
>> If you are OK about following patch, I'll apply it on extcon branch.
> 
> that's perfect, thanks for fixing it :-)
> 

Before applying this patch, I think that there are more generic method?
So, I check the extcon-palmas.c driver again. There is similiar case for id detection.

In some case, id detection use whether 'enable_id_detection' with own interrupt
or 'enable_gpio_id_dectection' with specific h/w gpio like this case of vbus.

In result, I implement the following patch for vbus gpio detection.
But, I'm not sure because I have not any H/W board for test.

If you possible, could you test it with following patch?

Thanks,
Chanwoo Choi

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a8..885ee95 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -216,11 +216,23 @@ static int palmas_usb_probe(struct platform_device *pdev)
 		return PTR_ERR(palmas_usb->id_gpiod);
 	}
 
+	palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus",
+							GPIOD_IN);
+	if (IS_ERR(palmas_usb->vbus_gpiod)) {
+		dev_err(&pdev->dev, "failed to get vbus gpio\n");
+		return PTR_ERR(palmas_usb->vbus_gpiod);
+	}
+
 	if (palmas_usb->enable_id_detection && palmas_usb->id_gpiod) {
 		palmas_usb->enable_id_detection = false;
 		palmas_usb->enable_gpio_id_detection = true;
 	}
 
+	if (palmas_usb->enable_vbus_detection && palmas_usb->vbus_gpiod) {
+		palmas_usb->enable_vbus_detection = false;
+		palmas_usb->enable_gpio_vbus_detection = true;
+	}
+
 	if (palmas_usb->enable_gpio_id_detection) {
 		u32 debounce;
 
@@ -311,6 +323,40 @@ static int palmas_usb_probe(struct platform_device *pdev)
 					palmas_usb->vbus_irq, status);
 			return status;
 		}
+	} else if (palmas_usb->enable_gpio_vbus_detection) {
+		/* remux GPIO_1 as VBUSDET */
+		status = palmas_update_bits(palmas,
+			PALMAS_PU_PD_OD_BASE,
+			PALMAS_PRIMARY_SECONDARY_PAD1,
+			PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+			(1 << PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT));
+		if (status < 0) {
+			dev_err(&pdev->dev, "can't remux GPIO1\n");
+			return status;
+		}
+
+		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
+						       PALMAS_VBUS_OTG_IRQ);
+		palmas_usb->gpio_vbus_irq = gpiod_to_irq(palmas_usb->vbus_gpiod);
+		if (palmas_usb->gpio_vbus_irq < 0) {
+			dev_err(&pdev->dev, "failed to get vbus irq\n");
+			return palmas_usb->gpio_vbus_irq;
+		}
+		status = devm_request_threaded_irq(&pdev->dev,
+						palmas_usb->gpio_vbus_irq,
+						NULL,
+						palmas_vbus_irq_handler,
+						IRQF_TRIGGER_FALLING |
+						IRQF_TRIGGER_RISING |
+						IRQF_ONESHOT |
+						IRQF_EARLY_RESUME,
+						"palmas_usb_vbus",
+						palmas_usb);
+		if (status < 0) {
+			dev_err(&pdev->dev,
+				"failed to request handler for vbus irq\n");
+			return status;
+		}
 	}
 
 	palmas_enable_irq(palmas_usb);
@@ -337,6 +383,8 @@ static int palmas_usb_suspend(struct device *dev)
 	if (device_may_wakeup(dev)) {
 		if (palmas_usb->enable_vbus_detection)
 			enable_irq_wake(palmas_usb->vbus_irq);
+		if (palmas_usb->enable_gpio_vbus_detection)
+			enable_irq_wake(palmas_usb->gpio_vbus_irq);
 		if (palmas_usb->enable_id_detection)
 			enable_irq_wake(palmas_usb->id_irq);
 		if (palmas_usb->enable_gpio_id_detection)
@@ -352,6 +400,8 @@ static int palmas_usb_resume(struct device *dev)
 	if (device_may_wakeup(dev)) {
 		if (palmas_usb->enable_vbus_detection)
 			disable_irq_wake(palmas_usb->vbus_irq);
+		if (palmas_usb->enable_gpio_vbus_detection)
+			disable_irq_wake(palmas_usb->gpio_vbus_irq);
 		if (palmas_usb->enable_id_detection)
 			disable_irq_wake(palmas_usb->id_irq);
 		if (palmas_usb->enable_gpio_id_detection)
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 13e1d96..7b2526f 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -553,7 +553,9 @@ struct palmas_usb {
 	int vbus_irq;
 
 	int gpio_id_irq;
+	int gpio_vbus_irq;
 	struct gpio_desc *id_gpiod;
+	struct gpio_desc *vbus_gpiod;
 	unsigned long sw_debounce_jiffies;
 	struct delayed_work wq_detectid;
 
@@ -562,6 +564,7 @@ struct palmas_usb {
 	bool enable_vbus_detection;
 	bool enable_id_detection;
 	bool enable_gpio_id_detection;
+	bool enable_gpio_vbus_detection;
 };
 
 #define comparator_to_palmas(x) container_of((x), struct palmas_usb, comparator)

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 16:34           ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:34 UTC (permalink / raw)
  To: Felipe Balbi, Chanwoo Choi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi Felipe,

On 2015. 11. 20. 오후 11:37, Felipe Balbi wrote:
> 
> Hi Chanwoo,
> 
> Chanwoo Choi <cw00.choi@samsung.com> writes:
>> Hi Felipe,
>>
>> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>>> Hi Felipe,
>>>
>>> Looks good to me. But I have one comment.
>>>
>>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>> interrupt.
>>>>
>>>> Beagle X15 uses that, in fact, and without it, I
>>>> could not get USB peripheral working with that
>>>> board.
>>>>
>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>> ---
>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>> index 93c30a885740..7985d092c069 100644
>>>> --- a/drivers/extcon/extcon-palmas.c
>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>  	}
>>>>  
>>>>  	if (palmas_usb->enable_vbus_detection) {
>>>> +		int irq = platform_get_irq(pdev, 0);
>>>> +
>>>> +		if (irq > 0) {
>>>> +			/* remux GPIO_1 as VBUSDET */
>>>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>>>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>> +					(1 << 3));
>>>
>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>> using '3'.
> 
> good point :-)
> 
>>>> +			if (status < 0) {
>>>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>> +				return status;
>>>> +			}
>>>> +
>>>> +			palmas_usb->vbus_irq = irq;
>>>> +		} else {
>>>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>>>> +					PALMAS_VBUS_IRQ);
>>>> +			palmas_usb->vbus_irq = irq;
>>>> +		}
>>>> +
>>>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>  						       PALMAS_VBUS_OTG_IRQ);
>>>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>> -							   PALMAS_VBUS_IRQ);
>>>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>>>  				palmas_usb->vbus_irq, NULL,
>>>>  				palmas_vbus_irq_handler,
>>>>
>>>
>>> Thanks,
>>> Chanwoo Choi
>>> --
>>> 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/
>>>
>>
>> If you are OK about following patch, I'll apply it on extcon branch.
> 
> that's perfect, thanks for fixing it :-)
> 

Before applying this patch, I think that there are more generic method?
So, I check the extcon-palmas.c driver again. There is similiar case for id detection.

In some case, id detection use whether 'enable_id_detection' with own interrupt
or 'enable_gpio_id_dectection' with specific h/w gpio like this case of vbus.

In result, I implement the following patch for vbus gpio detection.
But, I'm not sure because I have not any H/W board for test.

If you possible, could you test it with following patch?

Thanks,
Chanwoo Choi

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a8..885ee95 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -216,11 +216,23 @@ static int palmas_usb_probe(struct platform_device *pdev)
 		return PTR_ERR(palmas_usb->id_gpiod);
 	}
 
+	palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus",
+							GPIOD_IN);
+	if (IS_ERR(palmas_usb->vbus_gpiod)) {
+		dev_err(&pdev->dev, "failed to get vbus gpio\n");
+		return PTR_ERR(palmas_usb->vbus_gpiod);
+	}
+
 	if (palmas_usb->enable_id_detection && palmas_usb->id_gpiod) {
 		palmas_usb->enable_id_detection = false;
 		palmas_usb->enable_gpio_id_detection = true;
 	}
 
+	if (palmas_usb->enable_vbus_detection && palmas_usb->vbus_gpiod) {
+		palmas_usb->enable_vbus_detection = false;
+		palmas_usb->enable_gpio_vbus_detection = true;
+	}
+
 	if (palmas_usb->enable_gpio_id_detection) {
 		u32 debounce;
 
@@ -311,6 +323,40 @@ static int palmas_usb_probe(struct platform_device *pdev)
 					palmas_usb->vbus_irq, status);
 			return status;
 		}
+	} else if (palmas_usb->enable_gpio_vbus_detection) {
+		/* remux GPIO_1 as VBUSDET */
+		status = palmas_update_bits(palmas,
+			PALMAS_PU_PD_OD_BASE,
+			PALMAS_PRIMARY_SECONDARY_PAD1,
+			PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+			(1 << PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT));
+		if (status < 0) {
+			dev_err(&pdev->dev, "can't remux GPIO1\n");
+			return status;
+		}
+
+		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
+						       PALMAS_VBUS_OTG_IRQ);
+		palmas_usb->gpio_vbus_irq = gpiod_to_irq(palmas_usb->vbus_gpiod);
+		if (palmas_usb->gpio_vbus_irq < 0) {
+			dev_err(&pdev->dev, "failed to get vbus irq\n");
+			return palmas_usb->gpio_vbus_irq;
+		}
+		status = devm_request_threaded_irq(&pdev->dev,
+						palmas_usb->gpio_vbus_irq,
+						NULL,
+						palmas_vbus_irq_handler,
+						IRQF_TRIGGER_FALLING |
+						IRQF_TRIGGER_RISING |
+						IRQF_ONESHOT |
+						IRQF_EARLY_RESUME,
+						"palmas_usb_vbus",
+						palmas_usb);
+		if (status < 0) {
+			dev_err(&pdev->dev,
+				"failed to request handler for vbus irq\n");
+			return status;
+		}
 	}
 
 	palmas_enable_irq(palmas_usb);
@@ -337,6 +383,8 @@ static int palmas_usb_suspend(struct device *dev)
 	if (device_may_wakeup(dev)) {
 		if (palmas_usb->enable_vbus_detection)
 			enable_irq_wake(palmas_usb->vbus_irq);
+		if (palmas_usb->enable_gpio_vbus_detection)
+			enable_irq_wake(palmas_usb->gpio_vbus_irq);
 		if (palmas_usb->enable_id_detection)
 			enable_irq_wake(palmas_usb->id_irq);
 		if (palmas_usb->enable_gpio_id_detection)
@@ -352,6 +400,8 @@ static int palmas_usb_resume(struct device *dev)
 	if (device_may_wakeup(dev)) {
 		if (palmas_usb->enable_vbus_detection)
 			disable_irq_wake(palmas_usb->vbus_irq);
+		if (palmas_usb->enable_gpio_vbus_detection)
+			disable_irq_wake(palmas_usb->gpio_vbus_irq);
 		if (palmas_usb->enable_id_detection)
 			disable_irq_wake(palmas_usb->id_irq);
 		if (palmas_usb->enable_gpio_id_detection)
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 13e1d96..7b2526f 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -553,7 +553,9 @@ struct palmas_usb {
 	int vbus_irq;
 
 	int gpio_id_irq;
+	int gpio_vbus_irq;
 	struct gpio_desc *id_gpiod;
+	struct gpio_desc *vbus_gpiod;
 	unsigned long sw_debounce_jiffies;
 	struct delayed_work wq_detectid;
 
@@ -562,6 +564,7 @@ struct palmas_usb {
 	bool enable_vbus_detection;
 	bool enable_id_detection;
 	bool enable_gpio_id_detection;
+	bool enable_gpio_vbus_detection;
 };
 
 #define comparator_to_palmas(x) container_of((x), struct palmas_usb, comparator)

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 16:34           ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Felipe,

On 2015. 11. 20. ?? 11:37, Felipe Balbi wrote:
> 
> Hi Chanwoo,
> 
> Chanwoo Choi <cw00.choi@samsung.com> writes:
>> Hi Felipe,
>>
>> On 2015? 11? 20? 14:33, Chanwoo Choi wrote:
>>> Hi Felipe,
>>>
>>> Looks good to me. But I have one comment.
>>>
>>> On 2015? 11? 13? 02:57, Felipe Balbi wrote:
>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>> interrupt.
>>>>
>>>> Beagle X15 uses that, in fact, and without it, I
>>>> could not get USB peripheral working with that
>>>> board.
>>>>
>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>> ---
>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>> index 93c30a885740..7985d092c069 100644
>>>> --- a/drivers/extcon/extcon-palmas.c
>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>  	}
>>>>  
>>>>  	if (palmas_usb->enable_vbus_detection) {
>>>> +		int irq = platform_get_irq(pdev, 0);
>>>> +
>>>> +		if (irq > 0) {
>>>> +			/* remux GPIO_1 as VBUSDET */
>>>> +			status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>> +					PALMAS_PRIMARY_SECONDARY_PAD1,
>>>> +					PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>> +					(1 << 3));
>>>
>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>> using '3'.
> 
> good point :-)
> 
>>>> +			if (status < 0) {
>>>> +				dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>> +				return status;
>>>> +			}
>>>> +
>>>> +			palmas_usb->vbus_irq = irq;
>>>> +		} else {
>>>> +			irq = regmap_irq_get_virq(palmas->irq_data,
>>>> +					PALMAS_VBUS_IRQ);
>>>> +			palmas_usb->vbus_irq = irq;
>>>> +		}
>>>> +
>>>>  		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>  						       PALMAS_VBUS_OTG_IRQ);
>>>> -		palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>> -							   PALMAS_VBUS_IRQ);
>>>>  		status = devm_request_threaded_irq(palmas_usb->dev,
>>>>  				palmas_usb->vbus_irq, NULL,
>>>>  				palmas_vbus_irq_handler,
>>>>
>>>
>>> Thanks,
>>> Chanwoo Choi
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>> the body of a message to majordomo at vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> Please read the FAQ at  http://www.tux.org/lkml/
>>>
>>
>> If you are OK about following patch, I'll apply it on extcon branch.
> 
> that's perfect, thanks for fixing it :-)
> 

Before applying this patch, I think that there are more generic method?
So, I check the extcon-palmas.c driver again. There is similiar case for id detection.

In some case, id detection use whether 'enable_id_detection' with own interrupt
or 'enable_gpio_id_dectection' with specific h/w gpio like this case of vbus.

In result, I implement the following patch for vbus gpio detection.
But, I'm not sure because I have not any H/W board for test.

If you possible, could you test it with following patch?

Thanks,
Chanwoo Choi

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 93c30a8..885ee95 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -216,11 +216,23 @@ static int palmas_usb_probe(struct platform_device *pdev)
 		return PTR_ERR(palmas_usb->id_gpiod);
 	}
 
+	palmas_usb->vbus_gpiod = devm_gpiod_get_optional(&pdev->dev, "vbus",
+							GPIOD_IN);
+	if (IS_ERR(palmas_usb->vbus_gpiod)) {
+		dev_err(&pdev->dev, "failed to get vbus gpio\n");
+		return PTR_ERR(palmas_usb->vbus_gpiod);
+	}
+
 	if (palmas_usb->enable_id_detection && palmas_usb->id_gpiod) {
 		palmas_usb->enable_id_detection = false;
 		palmas_usb->enable_gpio_id_detection = true;
 	}
 
+	if (palmas_usb->enable_vbus_detection && palmas_usb->vbus_gpiod) {
+		palmas_usb->enable_vbus_detection = false;
+		palmas_usb->enable_gpio_vbus_detection = true;
+	}
+
 	if (palmas_usb->enable_gpio_id_detection) {
 		u32 debounce;
 
@@ -311,6 +323,40 @@ static int palmas_usb_probe(struct platform_device *pdev)
 					palmas_usb->vbus_irq, status);
 			return status;
 		}
+	} else if (palmas_usb->enable_gpio_vbus_detection) {
+		/* remux GPIO_1 as VBUSDET */
+		status = palmas_update_bits(palmas,
+			PALMAS_PU_PD_OD_BASE,
+			PALMAS_PRIMARY_SECONDARY_PAD1,
+			PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
+			(1 << PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT));
+		if (status < 0) {
+			dev_err(&pdev->dev, "can't remux GPIO1\n");
+			return status;
+		}
+
+		palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
+						       PALMAS_VBUS_OTG_IRQ);
+		palmas_usb->gpio_vbus_irq = gpiod_to_irq(palmas_usb->vbus_gpiod);
+		if (palmas_usb->gpio_vbus_irq < 0) {
+			dev_err(&pdev->dev, "failed to get vbus irq\n");
+			return palmas_usb->gpio_vbus_irq;
+		}
+		status = devm_request_threaded_irq(&pdev->dev,
+						palmas_usb->gpio_vbus_irq,
+						NULL,
+						palmas_vbus_irq_handler,
+						IRQF_TRIGGER_FALLING |
+						IRQF_TRIGGER_RISING |
+						IRQF_ONESHOT |
+						IRQF_EARLY_RESUME,
+						"palmas_usb_vbus",
+						palmas_usb);
+		if (status < 0) {
+			dev_err(&pdev->dev,
+				"failed to request handler for vbus irq\n");
+			return status;
+		}
 	}
 
 	palmas_enable_irq(palmas_usb);
@@ -337,6 +383,8 @@ static int palmas_usb_suspend(struct device *dev)
 	if (device_may_wakeup(dev)) {
 		if (palmas_usb->enable_vbus_detection)
 			enable_irq_wake(palmas_usb->vbus_irq);
+		if (palmas_usb->enable_gpio_vbus_detection)
+			enable_irq_wake(palmas_usb->gpio_vbus_irq);
 		if (palmas_usb->enable_id_detection)
 			enable_irq_wake(palmas_usb->id_irq);
 		if (palmas_usb->enable_gpio_id_detection)
@@ -352,6 +400,8 @@ static int palmas_usb_resume(struct device *dev)
 	if (device_may_wakeup(dev)) {
 		if (palmas_usb->enable_vbus_detection)
 			disable_irq_wake(palmas_usb->vbus_irq);
+		if (palmas_usb->enable_gpio_vbus_detection)
+			disable_irq_wake(palmas_usb->gpio_vbus_irq);
 		if (palmas_usb->enable_id_detection)
 			disable_irq_wake(palmas_usb->id_irq);
 		if (palmas_usb->enable_gpio_id_detection)
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 13e1d96..7b2526f 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -553,7 +553,9 @@ struct palmas_usb {
 	int vbus_irq;
 
 	int gpio_id_irq;
+	int gpio_vbus_irq;
 	struct gpio_desc *id_gpiod;
+	struct gpio_desc *vbus_gpiod;
 	unsigned long sw_debounce_jiffies;
 	struct delayed_work wq_detectid;
 
@@ -562,6 +564,7 @@ struct palmas_usb {
 	bool enable_vbus_detection;
 	bool enable_id_detection;
 	bool enable_gpio_id_detection;
+	bool enable_gpio_vbus_detection;
 };
 
 #define comparator_to_palmas(x) container_of((x), struct palmas_usb, comparator)

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
  2015-11-20 15:05           ` Chanwoo Choi
  (?)
@ 2015-11-20 16:37             ` Chanwoo Choi
  -1 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:37 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: Tony Lindgren, Rob Herring, MyungJoo Ham,
	Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi,

On Sat, Nov 21, 2015 at 12:05 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> Hi Felipe,
>
> On Fri, Nov 20, 2015 at 11:37 PM, Felipe Balbi <balbi@ti.com> wrote:
>>
>> Hi Chanwoo,
>>
>> Chanwoo Choi <cw00.choi@samsung.com> writes:
>>> Hi Felipe,
>>>
>>> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>>>> Hi Felipe,
>>>>
>>>> Looks good to me. But I have one comment.
>>>>
>>>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>>> interrupt.
>>>>>
>>>>> Beagle X15 uses that, in fact, and without it, I
>>>>> could not get USB peripheral working with that
>>>>> board.
>>>>>
>>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>>> ---
>>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>>> index 93c30a885740..7985d092c069 100644
>>>>> --- a/drivers/extcon/extcon-palmas.c
>>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>>     }
>>>>>
>>>>>     if (palmas_usb->enable_vbus_detection) {
>>>>> +           int irq = platform_get_irq(pdev, 0);
>>>>> +
>>>>> +           if (irq > 0) {
>>>>> +                   /* remux GPIO_1 as VBUSDET */
>>>>> +                   status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1,
>>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>>> +                                   (1 << 3));
>>>>
>>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>>> using '3'.
>>
>> good point :-)
>>
>>>>> +                   if (status < 0) {
>>>>> +                           dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>>> +                           return status;
>>>>> +                   }
>>>>> +
>>>>> +                   palmas_usb->vbus_irq = irq;
>>>>> +           } else {
>>>>> +                   irq = regmap_irq_get_virq(palmas->irq_data,
>>>>> +                                   PALMAS_VBUS_IRQ);
>>>>> +                   palmas_usb->vbus_irq = irq;
>>>>> +           }
>>>>> +
>>>>>             palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>>                                                    PALMAS_VBUS_OTG_IRQ);
>>>>> -           palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>> -                                                      PALMAS_VBUS_IRQ);
>>>>>             status = devm_request_threaded_irq(palmas_usb->dev,
>>>>>                             palmas_usb->vbus_irq, NULL,
>>>>>                             palmas_vbus_irq_handler,
>>>>>
>>>>
>>>> Thanks,
>>>> Chanwoo Choi
>>>> --
>>>> 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/
>>>>
>>>
>>> If you are OK about following patch, I'll apply it on extcon branch.
>>
>> that's perfect, thanks for fixing it :-)
>
> Applied it.

Please ignore this reply about applies because I need to discuss about it.

Thanks,
Chanwoo Choi

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

* Re: [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 16:37             ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:37 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: Tony Lindgren, Rob Herring, MyungJoo Ham,
	Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi,

On Sat, Nov 21, 2015 at 12:05 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> Hi Felipe,
>
> On Fri, Nov 20, 2015 at 11:37 PM, Felipe Balbi <balbi@ti.com> wrote:
>>
>> Hi Chanwoo,
>>
>> Chanwoo Choi <cw00.choi@samsung.com> writes:
>>> Hi Felipe,
>>>
>>> On 2015년 11월 20일 14:33, Chanwoo Choi wrote:
>>>> Hi Felipe,
>>>>
>>>> Looks good to me. But I have one comment.
>>>>
>>>> On 2015년 11월 13일 02:57, Felipe Balbi wrote:
>>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>>> interrupt.
>>>>>
>>>>> Beagle X15 uses that, in fact, and without it, I
>>>>> could not get USB peripheral working with that
>>>>> board.
>>>>>
>>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>>> ---
>>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>>> index 93c30a885740..7985d092c069 100644
>>>>> --- a/drivers/extcon/extcon-palmas.c
>>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>>     }
>>>>>
>>>>>     if (palmas_usb->enable_vbus_detection) {
>>>>> +           int irq = platform_get_irq(pdev, 0);
>>>>> +
>>>>> +           if (irq > 0) {
>>>>> +                   /* remux GPIO_1 as VBUSDET */
>>>>> +                   status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1,
>>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>>> +                                   (1 << 3));
>>>>
>>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>>> using '3'.
>>
>> good point :-)
>>
>>>>> +                   if (status < 0) {
>>>>> +                           dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>>> +                           return status;
>>>>> +                   }
>>>>> +
>>>>> +                   palmas_usb->vbus_irq = irq;
>>>>> +           } else {
>>>>> +                   irq = regmap_irq_get_virq(palmas->irq_data,
>>>>> +                                   PALMAS_VBUS_IRQ);
>>>>> +                   palmas_usb->vbus_irq = irq;
>>>>> +           }
>>>>> +
>>>>>             palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>>                                                    PALMAS_VBUS_OTG_IRQ);
>>>>> -           palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>> -                                                      PALMAS_VBUS_IRQ);
>>>>>             status = devm_request_threaded_irq(palmas_usb->dev,
>>>>>                             palmas_usb->vbus_irq, NULL,
>>>>>                             palmas_vbus_irq_handler,
>>>>>
>>>>
>>>> Thanks,
>>>> Chanwoo Choi
>>>> --
>>>> 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/
>>>>
>>>
>>> If you are OK about following patch, I'll apply it on extcon branch.
>>
>> that's perfect, thanks for fixing it :-)
>
> Applied it.

Please ignore this reply about applies because I need to discuss about it.

Thanks,
Chanwoo Choi

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

* [PATCH] extcon: palmas: add support for using VBUSDET output
@ 2015-11-20 16:37             ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sat, Nov 21, 2015 at 12:05 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> Hi Felipe,
>
> On Fri, Nov 20, 2015 at 11:37 PM, Felipe Balbi <balbi@ti.com> wrote:
>>
>> Hi Chanwoo,
>>
>> Chanwoo Choi <cw00.choi@samsung.com> writes:
>>> Hi Felipe,
>>>
>>> On 2015? 11? 20? 14:33, Chanwoo Choi wrote:
>>>> Hi Felipe,
>>>>
>>>> Looks good to me. But I have one comment.
>>>>
>>>> On 2015? 11? 13? 02:57, Felipe Balbi wrote:
>>>>> TPS659038 can remux its GPIO_1 as VBUSDET output,
>>>>> which can be tied to a SoC GPIO and used as a VBUS
>>>>> interrupt.
>>>>>
>>>>> Beagle X15 uses that, in fact, and without it, I
>>>>> could not get USB peripheral working with that
>>>>> board.
>>>>>
>>>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>>>> ---
>>>>>  drivers/extcon/extcon-palmas.c | 22 ++++++++++++++++++++--
>>>>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>>>>> index 93c30a885740..7985d092c069 100644
>>>>> --- a/drivers/extcon/extcon-palmas.c
>>>>> +++ b/drivers/extcon/extcon-palmas.c
>>>>> @@ -296,10 +296,28 @@ static int palmas_usb_probe(struct platform_device *pdev)
>>>>>     }
>>>>>
>>>>>     if (palmas_usb->enable_vbus_detection) {
>>>>> +           int irq = platform_get_irq(pdev, 0);
>>>>> +
>>>>> +           if (irq > 0) {
>>>>> +                   /* remux GPIO_1 as VBUSDET */
>>>>> +                   status = palmas_update_bits(palmas, PALMAS_PU_PD_OD_BASE,
>>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1,
>>>>> +                                   PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_MASK,
>>>>> +                                   (1 << 3));
>>>>
>>>> PALMAS_PRIMARY_SECONDARY_PAD1_GPIO_1_SHIFT is appropriate instead of
>>>> using '3'.
>>
>> good point :-)
>>
>>>>> +                   if (status < 0) {
>>>>> +                           dev_err(&pdev->dev, "can't remux GPIO1\n");
>>>>> +                           return status;
>>>>> +                   }
>>>>> +
>>>>> +                   palmas_usb->vbus_irq = irq;
>>>>> +           } else {
>>>>> +                   irq = regmap_irq_get_virq(palmas->irq_data,
>>>>> +                                   PALMAS_VBUS_IRQ);
>>>>> +                   palmas_usb->vbus_irq = irq;
>>>>> +           }
>>>>> +
>>>>>             palmas_usb->vbus_otg_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>>                                                    PALMAS_VBUS_OTG_IRQ);
>>>>> -           palmas_usb->vbus_irq = regmap_irq_get_virq(palmas->irq_data,
>>>>> -                                                      PALMAS_VBUS_IRQ);
>>>>>             status = devm_request_threaded_irq(palmas_usb->dev,
>>>>>                             palmas_usb->vbus_irq, NULL,
>>>>>                             palmas_vbus_irq_handler,
>>>>>
>>>>
>>>> Thanks,
>>>> Chanwoo Choi
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>>> the body of a message to majordomo at vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> Please read the FAQ at  http://www.tux.org/lkml/
>>>>
>>>
>>> If you are OK about following patch, I'll apply it on extcon branch.
>>
>> that's perfect, thanks for fixing it :-)
>
> Applied it.

Please ignore this reply about applies because I need to discuss about it.

Thanks,
Chanwoo Choi

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

* Re: [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
       [not found]     ` <564F4D90.4050305@gmail.com>
  2015-11-20 16:55         ` Chanwoo Choi
@ 2015-11-20 16:55         ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:55 UTC (permalink / raw)
  To: Chanwoo Choi, Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi,

On Sat, Nov 21, 2015 at 1:42 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> Hi,
>
> On 2015. 11. 20. 오후 2:39, Chanwoo Choi wrote:
>> Hi,
>>
>> On 2015년 11월 13일 02:53, Felipe Balbi wrote:
>>> According to latest schematics [1], GPIO_1/VBUSDET
>>> on TPS659038 is tied to AM57x GPIO4_21. We can use
>>> that as a VBUS interrupt, instead of relying on
>>> PMIC's VBUS interrupts which don't seem to be firing
>>> on x15 at all.
>>>
>>> A follow up patch will add support for using this
>>> GPIO-based interrupt mechanism for notifying about
>>> VBUS.
>>>
>>> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> index 6f3a1a7ec5f9..5e47162f7883 100644
>>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> @@ -560,6 +560,7 @@
>>>              extcon_usb2: tps659038_usb {
>>>                      compatible = "ti,palmas-usb-vid";
>>>                      ti,enable-vbus-detection;
>>> +                    interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
>
>                         vbus-gpio = <&gpio4 21>;

I'm sorry. I'm sending the missing email without writing completion.

I agree the Felipe's opinion. Just I think that we can use the
following property
instead of 'interrupt-extended'. Because I think 'vbus-gpio' is more
readability than before. The following property mean the attribute of
GPIO pin as VBUS.
- vbus-gpio = <&gpio4 21>;

Thanks,
Chanwoo Choi

>
>>>              };
>>>
>>>      };
>>>
>>
>> I check the schematic file. The GPIO4_21 pin is connected as following:
>> - GPIO_1/VBUSDET -> PMIC_VBUS_DET -> VBUS_DET -> AM5728 GPIO4_21 pin
>>
>> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
>>
>> Thanks,
>> Chanwoo Choi
>> --
>> 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] 42+ messages in thread

* Re: [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-20 16:55         ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:55 UTC (permalink / raw)
  To: Chanwoo Choi, Felipe Balbi, Tony Lindgren, Rob Herring, MyungJoo Ham
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	Linux Kernel Mailing List

Hi,

On Sat, Nov 21, 2015 at 1:42 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> Hi,
>
> On 2015. 11. 20. 오후 2:39, Chanwoo Choi wrote:
>> Hi,
>>
>> On 2015년 11월 13일 02:53, Felipe Balbi wrote:
>>> According to latest schematics [1], GPIO_1/VBUSDET
>>> on TPS659038 is tied to AM57x GPIO4_21. We can use
>>> that as a VBUS interrupt, instead of relying on
>>> PMIC's VBUS interrupts which don't seem to be firing
>>> on x15 at all.
>>>
>>> A follow up patch will add support for using this
>>> GPIO-based interrupt mechanism for notifying about
>>> VBUS.
>>>
>>> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> index 6f3a1a7ec5f9..5e47162f7883 100644
>>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> @@ -560,6 +560,7 @@
>>>              extcon_usb2: tps659038_usb {
>>>                      compatible = "ti,palmas-usb-vid";
>>>                      ti,enable-vbus-detection;
>>> +                    interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
>
>                         vbus-gpio = <&gpio4 21>;

I'm sorry. I'm sending the missing email without writing completion.

I agree the Felipe's opinion. Just I think that we can use the
following property
instead of 'interrupt-extended'. Because I think 'vbus-gpio' is more
readability than before. The following property mean the attribute of
GPIO pin as VBUS.
- vbus-gpio = <&gpio4 21>;

Thanks,
Chanwoo Choi

>
>>>              };
>>>
>>>      };
>>>
>>
>> I check the schematic file. The GPIO4_21 pin is connected as following:
>> - GPIO_1/VBUSDET -> PMIC_VBUS_DET -> VBUS_DET -> AM5728 GPIO4_21 pin
>>
>> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
>>
>> Thanks,
>> Chanwoo Choi
>> --
>> 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] 42+ messages in thread

* [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-20 16:55         ` Chanwoo Choi
  0 siblings, 0 replies; 42+ messages in thread
From: Chanwoo Choi @ 2015-11-20 16:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sat, Nov 21, 2015 at 1:42 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> Hi,
>
> On 2015. 11. 20. ?? 2:39, Chanwoo Choi wrote:
>> Hi,
>>
>> On 2015? 11? 13? 02:53, Felipe Balbi wrote:
>>> According to latest schematics [1], GPIO_1/VBUSDET
>>> on TPS659038 is tied to AM57x GPIO4_21. We can use
>>> that as a VBUS interrupt, instead of relying on
>>> PMIC's VBUS interrupts which don't seem to be firing
>>> on x15 at all.
>>>
>>> A follow up patch will add support for using this
>>> GPIO-based interrupt mechanism for notifying about
>>> VBUS.
>>>
>>> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> index 6f3a1a7ec5f9..5e47162f7883 100644
>>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>>> @@ -560,6 +560,7 @@
>>>              extcon_usb2: tps659038_usb {
>>>                      compatible = "ti,palmas-usb-vid";
>>>                      ti,enable-vbus-detection;
>>> +                    interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
>
>                         vbus-gpio = <&gpio4 21>;

I'm sorry. I'm sending the missing email without writing completion.

I agree the Felipe's opinion. Just I think that we can use the
following property
instead of 'interrupt-extended'. Because I think 'vbus-gpio' is more
readability than before. The following property mean the attribute of
GPIO pin as VBUS.
- vbus-gpio = <&gpio4 21>;

Thanks,
Chanwoo Choi

>
>>>              };
>>>
>>>      };
>>>
>>
>> I check the schematic file. The GPIO4_21 pin is connected as following:
>> - GPIO_1/VBUSDET -> PMIC_VBUS_DET -> VBUS_DET -> AM5728 GPIO4_21 pin
>>
>> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
>>
>> Thanks,
>> Chanwoo Choi
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo at 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] 42+ messages in thread

* Re: [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
  2015-11-20 16:55         ` Chanwoo Choi
  (?)
@ 2015-11-25 19:01           ` Tony Lindgren
  -1 siblings, 0 replies; 42+ messages in thread
From: Tony Lindgren @ 2015-11-25 19:01 UTC (permalink / raw)
  To: cw00.choi
  Cc: Felipe Balbi, Rob Herring, MyungJoo Ham, Linux OMAP Mailing List,
	Linux ARM Kernel Mailing List, Linux Kernel Mailing List

* Chanwoo Choi <cwchoi00@gmail.com> [151120 08:56]:
> Hi,
> 
> On Sat, Nov 21, 2015 at 1:42 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> > Hi,
> >
> > On 2015. 11. 20. 오후 2:39, Chanwoo Choi wrote:
> >> Hi,
> >>
> >> On 2015년 11월 13일 02:53, Felipe Balbi wrote:
> >>> According to latest schematics [1], GPIO_1/VBUSDET
> >>> on TPS659038 is tied to AM57x GPIO4_21. We can use
> >>> that as a VBUS interrupt, instead of relying on
> >>> PMIC's VBUS interrupts which don't seem to be firing
> >>> on x15 at all.
> >>>
> >>> A follow up patch will add support for using this
> >>> GPIO-based interrupt mechanism for notifying about
> >>> VBUS.
> >>>
> >>> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
> >>>
> >>> Signed-off-by: Felipe Balbi <balbi@ti.com>
> >>> ---
> >>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> index 6f3a1a7ec5f9..5e47162f7883 100644
> >>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> @@ -560,6 +560,7 @@
> >>>              extcon_usb2: tps659038_usb {
> >>>                      compatible = "ti,palmas-usb-vid";
> >>>                      ti,enable-vbus-detection;
> >>> +                    interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
> >
> >                         vbus-gpio = <&gpio4 21>;
> 
> I'm sorry. I'm sending the missing email without writing completion.
> 
> I agree the Felipe's opinion. Just I think that we can use the
> following property
> instead of 'interrupt-extended'. Because I think 'vbus-gpio' is more
> readability than before. The following property mean the attribute of
> GPIO pin as VBUS.
> - vbus-gpio = <&gpio4 21>;

Hmm OK not applying the first two patches yet then as it seems changes
are needed. Felipe can you please repost the missing ones after you guys
have figured out which dts changes are needed?

Regards,

Tony

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

* Re: [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-25 19:01           ` Tony Lindgren
  0 siblings, 0 replies; 42+ messages in thread
From: Tony Lindgren @ 2015-11-25 19:01 UTC (permalink / raw)
  To: cw00.choi
  Cc: Felipe Balbi, Rob Herring, MyungJoo Ham, Linux OMAP Mailing List,
	Linux ARM Kernel Mailing List, Linux Kernel Mailing List

* Chanwoo Choi <cwchoi00@gmail.com> [151120 08:56]:
> Hi,
> 
> On Sat, Nov 21, 2015 at 1:42 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> > Hi,
> >
> > On 2015. 11. 20. 오후 2:39, Chanwoo Choi wrote:
> >> Hi,
> >>
> >> On 2015년 11월 13일 02:53, Felipe Balbi wrote:
> >>> According to latest schematics [1], GPIO_1/VBUSDET
> >>> on TPS659038 is tied to AM57x GPIO4_21. We can use
> >>> that as a VBUS interrupt, instead of relying on
> >>> PMIC's VBUS interrupts which don't seem to be firing
> >>> on x15 at all.
> >>>
> >>> A follow up patch will add support for using this
> >>> GPIO-based interrupt mechanism for notifying about
> >>> VBUS.
> >>>
> >>> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
> >>>
> >>> Signed-off-by: Felipe Balbi <balbi@ti.com>
> >>> ---
> >>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> index 6f3a1a7ec5f9..5e47162f7883 100644
> >>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> @@ -560,6 +560,7 @@
> >>>              extcon_usb2: tps659038_usb {
> >>>                      compatible = "ti,palmas-usb-vid";
> >>>                      ti,enable-vbus-detection;
> >>> +                    interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
> >
> >                         vbus-gpio = <&gpio4 21>;
> 
> I'm sorry. I'm sending the missing email without writing completion.
> 
> I agree the Felipe's opinion. Just I think that we can use the
> following property
> instead of 'interrupt-extended'. Because I think 'vbus-gpio' is more
> readability than before. The following property mean the attribute of
> GPIO pin as VBUS.
> - vbus-gpio = <&gpio4 21>;

Hmm OK not applying the first two patches yet then as it seems changes
are needed. Felipe can you please repost the missing ones after you guys
have figured out which dts changes are needed?

Regards,

Tony

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

* [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt
@ 2015-11-25 19:01           ` Tony Lindgren
  0 siblings, 0 replies; 42+ messages in thread
From: Tony Lindgren @ 2015-11-25 19:01 UTC (permalink / raw)
  To: linux-arm-kernel

* Chanwoo Choi <cwchoi00@gmail.com> [151120 08:56]:
> Hi,
> 
> On Sat, Nov 21, 2015 at 1:42 AM, Chanwoo Choi <cwchoi00@gmail.com> wrote:
> > Hi,
> >
> > On 2015. 11. 20. ?? 2:39, Chanwoo Choi wrote:
> >> Hi,
> >>
> >> On 2015? 11? 13? 02:53, Felipe Balbi wrote:
> >>> According to latest schematics [1], GPIO_1/VBUSDET
> >>> on TPS659038 is tied to AM57x GPIO4_21. We can use
> >>> that as a VBUS interrupt, instead of relying on
> >>> PMIC's VBUS interrupts which don't seem to be firing
> >>> on x15 at all.
> >>>
> >>> A follow up patch will add support for using this
> >>> GPIO-based interrupt mechanism for notifying about
> >>> VBUS.
> >>>
> >>> [1] https://github.com/beagleboard/beagleboard-x15/blob/master/BeagleBoard-X15_RevA2.pdf
> >>>
> >>> Signed-off-by: Felipe Balbi <balbi@ti.com>
> >>> ---
> >>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> index 6f3a1a7ec5f9..5e47162f7883 100644
> >>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> >>> @@ -560,6 +560,7 @@
> >>>              extcon_usb2: tps659038_usb {
> >>>                      compatible = "ti,palmas-usb-vid";
> >>>                      ti,enable-vbus-detection;
> >>> +                    interrupts-extended = <&gpio4 21 IRQ_TYPE_EDGE_RISING>;
> >
> >                         vbus-gpio = <&gpio4 21>;
> 
> I'm sorry. I'm sending the missing email without writing completion.
> 
> I agree the Felipe's opinion. Just I think that we can use the
> following property
> instead of 'interrupt-extended'. Because I think 'vbus-gpio' is more
> readability than before. The following property mean the attribute of
> GPIO pin as VBUS.
> - vbus-gpio = <&gpio4 21>;

Hmm OK not applying the first two patches yet then as it seems changes
are needed. Felipe can you please repost the missing ones after you guys
have figured out which dts changes are needed?

Regards,

Tony

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

end of thread, other threads:[~2015-11-25 19:01 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 17:52 [PATCH 0/2] arm: beaglex15: fix USB Gadget Felipe Balbi
2015-11-12 17:52 ` Felipe Balbi
2015-11-12 17:52 ` Felipe Balbi
2015-11-12 17:53 ` [PATCH 1/2] arm: boot: dts: beaglex15: Remove ID GPIO Felipe Balbi
2015-11-12 17:53   ` Felipe Balbi
2015-11-12 17:53   ` Felipe Balbi
2015-11-12 17:53 ` [PATCH 2/2] arm: boot: beaglex15: pass correct interrupt Felipe Balbi
2015-11-12 17:53   ` Felipe Balbi
2015-11-12 17:53   ` Felipe Balbi
2015-11-20  5:39   ` Chanwoo Choi
2015-11-20  5:39     ` Chanwoo Choi
2015-11-20  5:39     ` Chanwoo Choi
     [not found]     ` <564F4D90.4050305@gmail.com>
2015-11-20 16:55       ` Chanwoo Choi
2015-11-20 16:55         ` Chanwoo Choi
2015-11-20 16:55         ` Chanwoo Choi
2015-11-25 19:01         ` Tony Lindgren
2015-11-25 19:01           ` Tony Lindgren
2015-11-25 19:01           ` Tony Lindgren
2015-11-12 17:54 ` [PATCH 0/2] arm: beaglex15: fix USB Gadget Felipe Balbi
2015-11-12 17:54   ` Felipe Balbi
2015-11-12 17:54   ` Felipe Balbi
2015-11-12 17:57 ` [PATCH] extcon: palmas: add support for using VBUSDET output Felipe Balbi
2015-11-12 17:57   ` Felipe Balbi
2015-11-12 17:57   ` Felipe Balbi
2015-11-20  5:33   ` Chanwoo Choi
2015-11-20  5:33     ` Chanwoo Choi
2015-11-20  5:33     ` Chanwoo Choi
2015-11-20  5:44     ` Chanwoo Choi
2015-11-20  5:44       ` Chanwoo Choi
2015-11-20  5:44       ` Chanwoo Choi
2015-11-20 14:37       ` Felipe Balbi
2015-11-20 14:37         ` Felipe Balbi
2015-11-20 14:37         ` Felipe Balbi
2015-11-20 15:05         ` Chanwoo Choi
2015-11-20 15:05           ` Chanwoo Choi
2015-11-20 15:05           ` Chanwoo Choi
2015-11-20 16:37           ` Chanwoo Choi
2015-11-20 16:37             ` Chanwoo Choi
2015-11-20 16:37             ` Chanwoo Choi
2015-11-20 16:34         ` Chanwoo Choi
2015-11-20 16:34           ` Chanwoo Choi
2015-11-20 16:34           ` Chanwoo Choi

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.