The sm5504 muic recognizes high current usb cable as CDP, Charging
Downstream Port as value 2 and usb_switch reported the value to
user. But Tizen deviced never expects usb state except attached(1)
and detached(0) and this causes usb connection failure. Fix to
report attached and detached usb state only from usb_switch.
Change-Id: I619d1af72e97120a16f0e88e5b1147b968511c41
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
static void muic_usb_cb(u8 attached)
{
- pr_info("%s: usb_mode:%d\n", __func__, attached);
+ pr_info("%s: usb_mode:%d\n", __func__, !!attached);
- usb_notify_cb(attached);
+ usb_notify_cb(!!attached);
#ifdef CONFIG_SWITCH
- switch_set_state(&switch_usb, attached);
+ switch_set_state(&switch_usb, !!attached);
#endif
return;
}