summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-11-14 14:38:20 +0800
committerPeter Chen <peter.chen@freescale.com>2013-11-18 15:05:44 +0800
commit9c3ceb845f1334c04e34c097598979e4173045f8 (patch)
treeb234f5fa6d459cd33503760a94e66920f0c4b5fe /include
parent669e29afb94fa5284e9322d0025f55469934542b (diff)
ENGR00287992-4 usb: chipidea: Add usb charger detect notify
- Change .notify's return value from void to int. - Add CI_HDRC_CONTROLLER_CHARGER_EVENT and CI_HDRC_CONTROLLER_CHARGER_POST_EVENT to finish the USB charger detection flow. - Add usb_gadget_vbus_connect for only notify udc when vbus is on, the main reason we add it is we don't want the first notification when the vbus is off, it causes the dev->power.usage_count equals -1 when do charger detection. Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/chipidea.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 8c3b7e2ec5a1..c75433e763e7 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -30,7 +30,10 @@ struct ci_hdrc_platform_data {
enum usb_dr_mode dr_mode;
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
- void (*notify_event) (struct ci_hdrc *ci, unsigned event);
+#define CI_HDRC_CONTROLLER_CHARGER_EVENT 2
+#define CI_HDRC_CONTROLLER_CHARGER_POST_EVENT 3
+ int (*notify_event) (struct ci_hdrc *ci, unsigned event);
+#define CI_HDRC_NOTIFY_RET_DEFER_EVENT 1
struct regulator *reg_vbus;
};