diff options
author | Peter Chen <peter.chen@freescale.com> | 2013-11-14 01:38:20 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:47:13 -0400 |
commit | 3023b4baecffba0a41e5fdb432de1f4dfcd31696 (patch) | |
tree | 9594dc947bd27d3d4f271166408ceef200cb4673 /include/linux | |
parent | cdf2ce6f2566500024e23b129f64c5c90cbac130 (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/linux')
-rw-r--r-- | include/linux/usb/chipidea.h | 5 |
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 { | |||
30 | enum usb_dr_mode dr_mode; | 30 | enum usb_dr_mode dr_mode; |
31 | #define CI_HDRC_CONTROLLER_RESET_EVENT 0 | 31 | #define CI_HDRC_CONTROLLER_RESET_EVENT 0 |
32 | #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 | 32 | #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 |
33 | void (*notify_event) (struct ci_hdrc *ci, unsigned event); | 33 | #define CI_HDRC_CONTROLLER_CHARGER_EVENT 2 |
34 | #define CI_HDRC_CONTROLLER_CHARGER_POST_EVENT 3 | ||
35 | int (*notify_event) (struct ci_hdrc *ci, unsigned event); | ||
36 | #define CI_HDRC_NOTIFY_RET_DEFER_EVENT 1 | ||
34 | struct regulator *reg_vbus; | 37 | struct regulator *reg_vbus; |
35 | }; | 38 | }; |
36 | 39 | ||