freexperia/android_Kernel_sony_msm8x27 — pull request #2 by chunkeey (2014-06-17 23:05:26+00:00)
Title: msm_otg: add floating charger support

Hello,

I got a Xperia M C1905 a few days ago and I've been trying to add support
for the Qi charger adapter (They are called M3-Y05, but I guess any will
do) that I bought as well [0]. The main difficulty is that the QI charger adapter
connects to the usb-otg port and (because it was cheap), it doesn't have
an 200 ohms resistor between to the D+ and D- lines. Hence, the "stock"
firmware (and cm 11.0) doesn't detect the charger and the phone won't charge.

However, while browsing for a possible solution, I came across a mod for
the MOTO G [1]. The op has the same qi charger adapter hardware and
the same issue. However, he discovered that for his kernel, there's an
option to enable a "floating charger" support. So, I tracked down the
necessary changes and applied them on my own kernel... and lo and
behold: It's working!

I've already tested if these changes affect other usb-otg functions like:
- charging via sony's original charger
- connecting a peripheral device (in this case usb mouse)
- connecting to a PC (mtp and charge)
And it passed all tests so far with flying colors!

Please consider this feature branch for merging. If you have comments or
requests please let me know!

Regards,
Chr

[0]
[1]