summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0fb0fc8)
We should only do charger detection if both we have enabled
usb charger at kernel configuration and set usb charger enable
at dts. Otherwise, we will do useless things, like toggle dp.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit
6b677c09dbda0274c6b2e1d61ea0d7f1cc73f621)
switch (event) {
case CI_HDRC_CONTROLLER_VBUS_EVENT:
if (data->usbmisc_data && ci->vbus_active) {
switch (event) {
case CI_HDRC_CONTROLLER_VBUS_EVENT:
if (data->usbmisc_data && ci->vbus_active) {
- if (data->imx6_usb_charger_detection)
+ if (data->imx6_usb_charger_detection) {
ret = imx6_usb_vbus_connect(&data->charger);
ret = imx6_usb_vbus_connect(&data->charger);
- if (!ret && data->charger.psy.type !=
- POWER_SUPPLY_TYPE_USB)
- ret = CI_HDRC_NOTIFY_RET_DEFER_EVENT;
+ if (!ret && data->charger.psy.type !=
+ POWER_SUPPLY_TYPE_USB)
+ ret = CI_HDRC_NOTIFY_RET_DEFER_EVENT;
+ }
} else if (data->usbmisc_data && !ci->vbus_active) {
if (data->imx6_usb_charger_detection)
ret = imx6_usb_vbus_disconnect(&data->charger);
} else if (data->usbmisc_data && !ci->vbus_active) {
if (data->imx6_usb_charger_detection)
ret = imx6_usb_vbus_disconnect(&data->charger);