Skip to contentSkip to conversation

extcon : add charger supported as per spec

PATCH New Jenny TC 1 participant 1 message Oct 10, 2012 External connector subsystem (extcon)

lore
Share & tools
lore

Jenny TC

author
#0 lore raw

PATCH 1/1 extcon : add charger supported as per spec

Add support for cable names as per USB charging spec 1.2 Also add cable name for AC adapter. This standardises the cable names

---
 drivers/extcon/extcon-class.c |    5 +++++
 include/linux/extcon.h        |    5 +++++
 2 files changed, 10 insertions(+)
drivers/extcon/extcon-class.c +5 -0
index 3d8e825..7188daf 100644
@@ -42,6 +42,11 @@
  * names that are actually used in your extcon device.
  */
 const char *extcon_cable_name[] = {
+	[EXTCON_SDP]		= "CHARGER_USB_SDP",
+	[EXTCON_DCP]		= "CHARGER_USB_DCP",
+	[EXTCON_CDP]		= "CHARGER_USB_CDP",
+	[EXTCON_ACA]		= "CHARGER_USB_ACA",
+	[EXTCON_AC]		= "CHARGER_AC",
 	[EXTCON_USB]		= "USB",
 	[EXTCON_USB_HOST]	= "USB-Host",
 	[EXTCON_TA]		= "TA",
include/linux/extcon.h +5 -0
index 9be8286..073fd49 100644
@@ -53,6 +53,11 @@ enum extcon_cable_name {
 	EXTCON_FAST_CHARGER,
 	EXTCON_SLOW_CHARGER,
 	EXTCON_CHARGE_DOWNSTREAM, /* Charging an external device */
+	EXTCON_SDP,
+	EXTCON_DCP,
+	EXTCON_CDP,
+	EXTCON_ACA,
+	EXTCON_AC,
 	EXTCON_HDMI,
 	EXTCON_MHL,
 	EXTCON_DVI,
Signature · 1 line
1.7.9.5