Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-02-02 Thread Chanwoo Choi
Hi Roger,

On 02/02/2015 06:09 PM, Roger Quadros wrote:
 Chanwoo,
 
 On 02/02/15 07:04, Chanwoo Choi wrote:
 Hi Roger,

 On 01/30/2015 11:05 PM, Roger Quadros wrote:
 Hi,

 On 30/01/15 13:04, Roger Quadros wrote:
 Felipe  Chanwoo,

 On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

 Change all instances of USB-HOST to USB-Host.

 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

 This patch has no dependency to the rest so can be picked up as soon as 
 possible.

 Do you think it is better to go via the USB tree?
 If yes then Chanwoo, can you please Ack this one? Thanks.

 This would mean that only the first patch needs to go through extcon tree 
 as Tony
 will pick the rest.

 Hold on. Let's first decide what we really want to go ahead with
 USB-Host or USB-HOST.

 Currently, extcon driver have used the specific cable name(USB-Host or 
 USB-HOST)
 without any standard way. So, I have plan to define common cable name in 
 extcon
 header file by using capital letter.
 
 OK. In that case, this patch is not required.
 I will resend patch 1 with cable name corrected to USB-HOST.

If you possbile, I want to use 'USB-HOST' cable name in drivers related to 
extcon.
If we use different cable name, this cause the confusion to control cable.

Thanks,
Chanwoo


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-02-02 Thread Roger Quadros
On 02/02/15 11:55, Chanwoo Choi wrote:
 Hi Roger,
 
 On 02/02/2015 06:09 PM, Roger Quadros wrote:
 Chanwoo,

 On 02/02/15 07:04, Chanwoo Choi wrote:
 Hi Roger,

 On 01/30/2015 11:05 PM, Roger Quadros wrote:
 Hi,

 On 30/01/15 13:04, Roger Quadros wrote:
 Felipe  Chanwoo,

 On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

 Change all instances of USB-HOST to USB-Host.

 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

 This patch has no dependency to the rest so can be picked up as soon as 
 possible.

 Do you think it is better to go via the USB tree?
 If yes then Chanwoo, can you please Ack this one? Thanks.

 This would mean that only the first patch needs to go through extcon tree 
 as Tony
 will pick the rest.

 Hold on. Let's first decide what we really want to go ahead with
 USB-Host or USB-HOST.

 Currently, extcon driver have used the specific cable name(USB-Host or 
 USB-HOST)
 without any standard way. So, I have plan to define common cable name in 
 extcon
 header file by using capital letter.

 OK. In that case, this patch is not required.
 I will resend patch 1 with cable name corrected to USB-HOST.
 
 If you possbile, I want to use 'USB-HOST' cable name in drivers related to 
 extcon.
 If we use different cable name, this cause the confusion to control cable.
 

Kernel tree shows following users of USB-Host that will have to be changed to
USB-HOST.

extcon-class.c: [EXTCON_USB_HOST]   = USB-Host,
extcon-max77693.c:  [EXTCON_CABLE_USB_HOST] = USB-Host,
extcon-max77693.c:  extcon_set_cable_state(info-edev, USB-Host, 
attached);
extcon-max8997.c:   [EXTCON_CABLE_USB_HOST] = USB-Host,
extcon-max8997.c:   extcon_set_cable_state(info-edev, USB-Host, 
attached);
extcon-rt8973a.c:   [EXTCON_CABLE_USB_HOST] = USB-Host,
extcon-sm5502.c:[EXTCON_CABLE_USB_HOST] = USB-Host,

I'm not aware if any user space programs depend on this name. Do you know of 
any?

cheers,
-roger
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-02-02 Thread Chanwoo Choi
On 02/02/2015 07:01 PM, Roger Quadros wrote:
 On 02/02/15 11:55, Chanwoo Choi wrote:
 Hi Roger,

 On 02/02/2015 06:09 PM, Roger Quadros wrote:
 Chanwoo,

 On 02/02/15 07:04, Chanwoo Choi wrote:
 Hi Roger,

 On 01/30/2015 11:05 PM, Roger Quadros wrote:
 Hi,

 On 30/01/15 13:04, Roger Quadros wrote:
 Felipe  Chanwoo,

 On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

 Change all instances of USB-HOST to USB-Host.

 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

 This patch has no dependency to the rest so can be picked up as soon as 
 possible.

 Do you think it is better to go via the USB tree?
 If yes then Chanwoo, can you please Ack this one? Thanks.

 This would mean that only the first patch needs to go through extcon 
 tree as Tony
 will pick the rest.

 Hold on. Let's first decide what we really want to go ahead with
 USB-Host or USB-HOST.

 Currently, extcon driver have used the specific cable name(USB-Host or 
 USB-HOST)
 without any standard way. So, I have plan to define common cable name in 
 extcon
 header file by using capital letter.

 OK. In that case, this patch is not required.
 I will resend patch 1 with cable name corrected to USB-HOST.

 If you possbile, I want to use 'USB-HOST' cable name in drivers related to 
 extcon.
 If we use different cable name, this cause the confusion to control cable.

 
 Kernel tree shows following users of USB-Host that will have to be changed 
 to
 USB-HOST.

You're right. I'll modify all cable name of 'USB-HOST'.
Also, I have plan to use only capital letter for cable name.

 
 extcon-class.c:   [EXTCON_USB_HOST]   = USB-Host,
 extcon-max77693.c:[EXTCON_CABLE_USB_HOST] = USB-Host,
 extcon-max77693.c:extcon_set_cable_state(info-edev, USB-Host, 
 attached);
 extcon-max8997.c: [EXTCON_CABLE_USB_HOST] = USB-Host,
 extcon-max8997.c: extcon_set_cable_state(info-edev, USB-Host, 
 attached);
 extcon-rt8973a.c: [EXTCON_CABLE_USB_HOST] = USB-Host,
 extcon-sm5502.c:  [EXTCON_CABLE_USB_HOST] = USB-Host,
 
 I'm not aware if any user space programs depend on this name. Do you know of 
 any?

As I knew, released samsung smart-phone used the cable name to detect the cable 
state
becaues extcon send the uevent with both cable name and cable state.

Thanks,
Chanwoo Choi

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-02-02 Thread Roger Quadros
Chanwoo,

On 02/02/15 07:04, Chanwoo Choi wrote:
 Hi Roger,
 
 On 01/30/2015 11:05 PM, Roger Quadros wrote:
 Hi,

 On 30/01/15 13:04, Roger Quadros wrote:
 Felipe  Chanwoo,

 On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

 Change all instances of USB-HOST to USB-Host.

 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

 This patch has no dependency to the rest so can be picked up as soon as 
 possible.

 Do you think it is better to go via the USB tree?
 If yes then Chanwoo, can you please Ack this one? Thanks.

 This would mean that only the first patch needs to go through extcon tree 
 as Tony
 will pick the rest.

 Hold on. Let's first decide what we really want to go ahead with
 USB-Host or USB-HOST.
 
 Currently, extcon driver have used the specific cable name(USB-Host or 
 USB-HOST)
 without any standard way. So, I have plan to define common cable name in 
 extcon
 header file by using capital letter.

OK. In that case, this patch is not required.
I will resend patch 1 with cable name corrected to USB-HOST.

cheers,
-roger
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-02-01 Thread Chanwoo Choi
Hi Roger,

On 01/30/2015 11:05 PM, Roger Quadros wrote:
 Hi,
 
 On 30/01/15 13:04, Roger Quadros wrote:
 Felipe  Chanwoo,

 On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

 Change all instances of USB-HOST to USB-Host.

 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

 This patch has no dependency to the rest so can be picked up as soon as 
 possible.

 Do you think it is better to go via the USB tree?
 If yes then Chanwoo, can you please Ack this one? Thanks.

 This would mean that only the first patch needs to go through extcon tree as 
 Tony
 will pick the rest.
 
 Hold on. Let's first decide what we really want to go ahead with
 USB-Host or USB-HOST.

Currently, extcon driver have used the specific cable name(USB-Host or USB-HOST)
without any standard way. So, I have plan to define common cable name in extcon
header file by using capital letter.

Thanks,
Chanwoo Choi

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-01-30 Thread Roger Quadros
Hi,

On 30/01/15 13:04, Roger Quadros wrote:
 Felipe  Chanwoo,
 
 On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

 Change all instances of USB-HOST to USB-Host.

 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com
 
 This patch has no dependency to the rest so can be picked up as soon as 
 possible.
 
 Do you think it is better to go via the USB tree?
 If yes then Chanwoo, can you please Ack this one? Thanks.
 
 This would mean that only the first patch needs to go through extcon tree as 
 Tony
 will pick the rest.

Hold on. Let's first decide what we really want to go ahead with
USB-Host or USB-HOST.

cheers,
-roger
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-01-30 Thread Roger Quadros
Felipe  Chanwoo,

On 26/01/15 14:15, Roger Quadros wrote:
 The recommended name for USB-Host cable state is USB-Host and not
 USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.
 
 Change all instances of USB-HOST to USB-Host.
 
 Signed-off-by: Roger Quadros rog...@ti.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

This patch has no dependency to the rest so can be picked up as soon as 
possible.

Do you think it is better to go via the USB tree?
If yes then Chanwoo, can you please Ack this one? Thanks.

This would mean that only the first patch needs to go through extcon tree as 
Tony
will pick the rest.

cheers,
-roger

 ---
  drivers/extcon/extcon-palmas.c | 18 +-
  drivers/usb/dwc3/dwc3-omap.c   |  6 +++---
  drivers/usb/phy/phy-omap-otg.c |  4 ++--
  drivers/usb/phy/phy-tahvo.c|  8 
  4 files changed, 18 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
 index 11c6757..6d002c3 100644
 --- a/drivers/extcon/extcon-palmas.c
 +++ b/drivers/extcon/extcon-palmas.c
 @@ -31,7 +31,7 @@
  
  static const char *palmas_extcon_cable[] = {
   [0] = USB,
 - [1] = USB-HOST,
 + [1] = USB-Host,
   NULL,
  };
  
 @@ -93,26 +93,26 @@ static irqreturn_t palmas_id_irq_handler(int irq, void 
 *_palmas_usb)
   PALMAS_USB_ID_INT_LATCH_CLR,
   PALMAS_USB_ID_INT_EN_HI_CLR_ID_GND);
   palmas_usb-linkstat = PALMAS_USB_STATE_ID;
 - extcon_set_cable_state(palmas_usb-edev, USB-HOST, true);
 - dev_info(palmas_usb-dev, USB-HOST cable is attached\n);
 + extcon_set_cable_state(palmas_usb-edev, USB-Host, true);
 + dev_info(palmas_usb-dev, USB-Host cable is attached\n);
   } else if ((set  PALMAS_USB_ID_INT_SRC_ID_FLOAT) 
   (id_src  PALMAS_USB_ID_INT_SRC_ID_FLOAT)) {
   palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE,
   PALMAS_USB_ID_INT_LATCH_CLR,
   PALMAS_USB_ID_INT_EN_HI_CLR_ID_FLOAT);
   palmas_usb-linkstat = PALMAS_USB_STATE_DISCONNECT;
 - extcon_set_cable_state(palmas_usb-edev, USB-HOST, false);
 - dev_info(palmas_usb-dev, USB-HOST cable is detached\n);
 + extcon_set_cable_state(palmas_usb-edev, USB-Host, false);
 + dev_info(palmas_usb-dev, USB-Host cable is detached\n);
   } else if ((palmas_usb-linkstat == PALMAS_USB_STATE_ID) 
   (!(set  PALMAS_USB_ID_INT_SRC_ID_GND))) {
   palmas_usb-linkstat = PALMAS_USB_STATE_DISCONNECT;
 - extcon_set_cable_state(palmas_usb-edev, USB-HOST, false);
 - dev_info(palmas_usb-dev, USB-HOST cable is detached\n);
 + extcon_set_cable_state(palmas_usb-edev, USB-Host, false);
 + dev_info(palmas_usb-dev, USB-Host cable is detached\n);
   } else if ((palmas_usb-linkstat == PALMAS_USB_STATE_DISCONNECT) 
   (id_src  PALMAS_USB_ID_INT_SRC_ID_GND)) {
   palmas_usb-linkstat = PALMAS_USB_STATE_ID;
 - extcon_set_cable_state(palmas_usb-edev, USB-HOST, true);
 - dev_info(palmas_usb-dev,  USB-HOST cable is attached\n);
 + extcon_set_cable_state(palmas_usb-edev, USB-Host, true);
 + dev_info(palmas_usb-dev,  USB-Host cable is attached\n);
   }
  
   return IRQ_HANDLED;
 diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
 index 172d64e..6713ad9 100644
 --- a/drivers/usb/dwc3/dwc3-omap.c
 +++ b/drivers/usb/dwc3/dwc3-omap.c
 @@ -445,14 +445,14 @@ static int dwc3_omap_extcon_register(struct dwc3_omap 
 *omap)
  
   omap-id_nb.notifier_call = dwc3_omap_id_notifier;
   ret = extcon_register_interest(omap-extcon_id_dev,
 -edev-name, USB-HOST,
 +edev-name, USB-Host,
  omap-id_nb);
   if (ret  0)
 - dev_vdbg(omap-dev, failed to register notifier for 
 USB-HOST\n);
 + dev_vdbg(omap-dev, failed to register notifier for 
 USB-Host\n);
  
   if (extcon_get_cable_state(edev, USB) == true)
   dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID);
 - if (extcon_get_cable_state(edev, USB-HOST) == true)
 + if (extcon_get_cable_state(edev, USB-Host) == true)
   dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_GROUND);
   }
  
 diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c
 index 56ee760..53cba3f 100644
 --- a/drivers/usb/phy/phy-omap-otg.c
 +++ b/drivers/usb/phy/phy-omap-otg.c
 @@ -119,7 +119,7 @@ static int omap_otg_probe(struct platform_device *pdev)
   otg_dev-vbus_nb.notifier_call = omap_otg_vbus_notifier;
  
   ret = 

[PATCH v2 2/7] usb: extcon: Fix USB-Host cable name

2015-01-26 Thread Roger Quadros
The recommended name for USB-Host cable state is USB-Host and not
USB-HOST as per drivers/extcon/extcon-class.c extcon_cable_name.

Change all instances of USB-HOST to USB-Host.

Signed-off-by: Roger Quadros rog...@ti.com
Reviewed-by: Felipe Balbi ba...@ti.com
Acked-by: Felipe Balbi ba...@ti.com
---
 drivers/extcon/extcon-palmas.c | 18 +-
 drivers/usb/dwc3/dwc3-omap.c   |  6 +++---
 drivers/usb/phy/phy-omap-otg.c |  4 ++--
 drivers/usb/phy/phy-tahvo.c|  8 
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 11c6757..6d002c3 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -31,7 +31,7 @@
 
 static const char *palmas_extcon_cable[] = {
[0] = USB,
-   [1] = USB-HOST,
+   [1] = USB-Host,
NULL,
 };
 
@@ -93,26 +93,26 @@ static irqreturn_t palmas_id_irq_handler(int irq, void 
*_palmas_usb)
PALMAS_USB_ID_INT_LATCH_CLR,
PALMAS_USB_ID_INT_EN_HI_CLR_ID_GND);
palmas_usb-linkstat = PALMAS_USB_STATE_ID;
-   extcon_set_cable_state(palmas_usb-edev, USB-HOST, true);
-   dev_info(palmas_usb-dev, USB-HOST cable is attached\n);
+   extcon_set_cable_state(palmas_usb-edev, USB-Host, true);
+   dev_info(palmas_usb-dev, USB-Host cable is attached\n);
} else if ((set  PALMAS_USB_ID_INT_SRC_ID_FLOAT) 
(id_src  PALMAS_USB_ID_INT_SRC_ID_FLOAT)) {
palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE,
PALMAS_USB_ID_INT_LATCH_CLR,
PALMAS_USB_ID_INT_EN_HI_CLR_ID_FLOAT);
palmas_usb-linkstat = PALMAS_USB_STATE_DISCONNECT;
-   extcon_set_cable_state(palmas_usb-edev, USB-HOST, false);
-   dev_info(palmas_usb-dev, USB-HOST cable is detached\n);
+   extcon_set_cable_state(palmas_usb-edev, USB-Host, false);
+   dev_info(palmas_usb-dev, USB-Host cable is detached\n);
} else if ((palmas_usb-linkstat == PALMAS_USB_STATE_ID) 
(!(set  PALMAS_USB_ID_INT_SRC_ID_GND))) {
palmas_usb-linkstat = PALMAS_USB_STATE_DISCONNECT;
-   extcon_set_cable_state(palmas_usb-edev, USB-HOST, false);
-   dev_info(palmas_usb-dev, USB-HOST cable is detached\n);
+   extcon_set_cable_state(palmas_usb-edev, USB-Host, false);
+   dev_info(palmas_usb-dev, USB-Host cable is detached\n);
} else if ((palmas_usb-linkstat == PALMAS_USB_STATE_DISCONNECT) 
(id_src  PALMAS_USB_ID_INT_SRC_ID_GND)) {
palmas_usb-linkstat = PALMAS_USB_STATE_ID;
-   extcon_set_cable_state(palmas_usb-edev, USB-HOST, true);
-   dev_info(palmas_usb-dev,  USB-HOST cable is attached\n);
+   extcon_set_cable_state(palmas_usb-edev, USB-Host, true);
+   dev_info(palmas_usb-dev,  USB-Host cable is attached\n);
}
 
return IRQ_HANDLED;
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 172d64e..6713ad9 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -445,14 +445,14 @@ static int dwc3_omap_extcon_register(struct dwc3_omap 
*omap)
 
omap-id_nb.notifier_call = dwc3_omap_id_notifier;
ret = extcon_register_interest(omap-extcon_id_dev,
-  edev-name, USB-HOST,
+  edev-name, USB-Host,
   omap-id_nb);
if (ret  0)
-   dev_vdbg(omap-dev, failed to register notifier for 
USB-HOST\n);
+   dev_vdbg(omap-dev, failed to register notifier for 
USB-Host\n);
 
if (extcon_get_cable_state(edev, USB) == true)
dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID);
-   if (extcon_get_cable_state(edev, USB-HOST) == true)
+   if (extcon_get_cable_state(edev, USB-Host) == true)
dwc3_omap_set_mailbox(omap, OMAP_DWC3_ID_GROUND);
}
 
diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c
index 56ee760..53cba3f 100644
--- a/drivers/usb/phy/phy-omap-otg.c
+++ b/drivers/usb/phy/phy-omap-otg.c
@@ -119,7 +119,7 @@ static int omap_otg_probe(struct platform_device *pdev)
otg_dev-vbus_nb.notifier_call = omap_otg_vbus_notifier;
 
ret = extcon_register_interest(otg_dev-id_dev, config-extcon,
-  USB-HOST, otg_dev-id_nb);
+  USB-Host, otg_dev-id_nb);
if (ret)
return ret;
 
@@ -130,7 +130,7 @@ static int omap_otg_probe(struct platform_device *pdev)
return ret;
}
 
-