View Single Post
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#784
Originally Posted by javispedro View Post
When vbus is detected by twl3040 twl3040-usb fires a sysfs-node changed event (linkstat) which I believe bme is listening to, which then proceeds to read the charger sysfs node thus causing musb_verify_charger to run thus causing DP & DM pull downs to be disabled and strong pull up on DP to be enabled (thus entering gadget/peripheral mode)
Confirmed:

connecting charger causes VBUS signal, some application (BME?) reads /sys/devices/platform/musb_hdrc/charger --> calls musb_charger_detect() and if a charger is a high-performance charger (not PC) then VDAT signal enforces a call to musb_verify_charger().

The last function clears DP/DM PULLDOWN and sets only DM_PULLDOWN.

But this happens only for high performance charger.
 

The Following 3 Users Say Thank You to egoshin For This Useful Post: