EM/Charger: Support for USB CDP type Charger Detection.
authorVinay Hegde <vinayx.hegde.kota@intel.com>
Fri, 20 Apr 2012 18:53:42 +0000 (00:23 +0530)
committerbuildbot <buildbot@intel.com>
Thu, 26 Apr 2012 16:15:55 +0000 (09:15 -0700)
BZ: 29469

This patch adds support for USB CDP type detection in
the Charger driver.

Change-Id: Ie16abb4fea4e614ebd24d3066ddd5282561add20
Signed-off-by: Vinay Hegde <vinayx.hegde.kota@intel.com>
Reviewed-on: http://android.intel.com:8080/43069
Reviewed-by: Pandey, Raj <raj.pandey@intel.com>
Reviewed-by: Tc, Jenny <jenny.tc@intel.com>
Reviewed-by: Pallala, Ramakrishna <ramakrishna.pallala@intel.com>
Tested-by: Kallappa Manjanna, MadhukumarX <madhukumarx.kallappa.manjanna@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/power/bq24192_charger.c

index e07642f..00ceee0 100644 (file)
@@ -821,6 +821,10 @@ static void bq24192_event_worker(struct work_struct *work)
                        chip->usb.type = POWER_SUPPLY_TYPE_USB_DCP;
                        dev_info(&chip->client->dev,
                                 "Charger type DCP\n");
+               } else if (chip->chrg_type == POWER_SUPPLY_TYPE_USB_CDP) {
+                       chip->usb.type = POWER_SUPPLY_TYPE_USB_CDP;
+                       dev_info(&chip->client->dev,
+                               "Charger type CDP\n");
                } else if (chip->chrg_type == POWER_SUPPLY_TYPE_USB) {
                        chip->usb.type = POWER_SUPPLY_TYPE_USB;
                        dev_info(&chip->client->dev,