usb: bc: add battery charger detect head file
authorlyz <lyz@rock-chips.com>
Fri, 19 Jun 2015 11:26:30 +0000 (19:26 +0800)
committerlyz <lyz@rock-chips.com>
Fri, 19 Jun 2015 11:27:47 +0000 (19:27 +0800)
Signed-off-by: lyz <lyz@rock-chips.com>
drivers/usb/dwc_otg_310/usbdev_bc.h
include/linux/power/rk_usbbc.h [new file with mode: 0644]

index 5f3e11fcd2a0762e4bafef889f31ce2f4b7b6521..58529f78efc707811334bd32bd9bf0ef7b00ed65 100755 (executable)
@@ -1,17 +1,8 @@
 #ifndef _USBDEV_BC_H
 #define _USBDEV_BC_H
 
-/* USB Charger Types */
-enum bc_port_type{
-       USB_BC_TYPE_DISCNT = 0,
-       USB_BC_TYPE_SDP,
-       USB_BC_TYPE_DCP,
-       USB_BC_TYPE_CDP,
-       USB_BC_TYPE_UNKNOW,
-       USB_OTG_POWER_ON,
-       USB_OTG_POWER_OFF,
-       USB_BC_TYPE_MAX,
-};
+#include <linux/power/rk_usbbc.h>
+
 enum {
        BC_BVALID = 0,
        BC_IDDIG,
@@ -73,11 +64,7 @@ USB Port Type
 2 : DCP - charger
 3 : CDP - pc with big currect charge
 ***********************************/
-extern int dwc_otg_check_dpdm(bool wait);
 extern enum bc_port_type usb_battery_charger_detect(bool wait);
 extern void rk_battery_charger_detect_cb(int charger_type_new);
-extern int rk_bc_detect_register_notifier(struct notifier_block *nb,
-                                                 enum bc_port_type *type);
-extern int rk_bc_detect_unregister_notifier(struct notifier_block *nb);
 
 #endif
diff --git a/include/linux/power/rk_usbbc.h b/include/linux/power/rk_usbbc.h
new file mode 100644 (file)
index 0000000..e1d2b72
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef __RK_USBBC_H
+#define __RK_USBBC_H
+
+/* USB Charger Types */
+enum bc_port_type{
+       USB_BC_TYPE_DISCNT = 0,
+       USB_BC_TYPE_SDP,
+       USB_BC_TYPE_DCP,
+       USB_BC_TYPE_CDP,
+       USB_BC_TYPE_UNKNOW,
+       USB_OTG_POWER_ON,
+       USB_OTG_POWER_OFF,
+       USB_BC_TYPE_MAX,
+};
+
+/***********************************
+ * USB Port Type
+ * 0 : Disconnect
+ * 1 : SDP - pc
+ * 2 : DCP - charger
+ * 3 : CDP - pc with big currect charge
+ ************************************/
+extern int dwc_otg_check_dpdm(bool wait);
+extern int rk_bc_detect_register_notifier(struct notifier_block *nb,
+                                         enum bc_port_type *type);
+extern int rk_bc_detect_unregister_notifier(struct notifier_block *nb);
+
+#endif