USB: OTG: msm: Implement charger detection
commitd860852e087eed7eadbea64f1a8db9a231c5e9b3
authorPavankumar Kondeti <pkondeti@codeaurora.org>
Wed, 4 May 2011 04:49:47 +0000 (4 10:19 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 7 May 2011 01:27:48 +0000 (6 18:27 -0700)
tree792b7c6d3cfe769983929699bbd385e8985b668e
parent0f73cac8e41723d600c91a0f5b481dc3202f4f82
USB: OTG: msm: Implement charger detection

Implement good battery algorithm defined in the battery charging V1.2 spec
for detecting different charging ports.  USB hardware is put into low power
mode when connected to a dedicated charging port.  vbus_draw and set_power
methods are implemented for determining the allowed current from Host in
different states (un-configured/suspend/configured).

The charger block is implemented using vendor specific registers and the
PHY used in MSM8960(28nm PHY) different from older targets like MSM8x60
and MSM7x30(45nm PHY).  The PHY vendor and product id registers are not
implemented in the above chipsets.  Hence PHY type is passed via platform
data.

Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/ci13xxx_udc.c
drivers/usb/otg/msm_otg.c
include/linux/usb/msm_hsusb.h