ARM: tegra: pluto: add max77665 charging regulator consumer
Laxman Dewangan [Thu, 30 May 2013 19:51:22 +0000 (00:51 +0530)]
MAX77665 charger driver expose the charging functionality through
regulator framework. Add the consumer of this regulator.

Change-Id: Idd4399c12744de2faa0151368fefb81259c4f4c5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/234256
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

arch/arm/mach-tegra/board-pluto-sensors.c

index 7439d16..db140c2 100644 (file)
@@ -227,6 +227,10 @@ static struct max77665_charger_cable maxim_cable[] = {
        },
 };
 
+static struct regulator_consumer_supply max77665_charger_supply[] = {
+       REGULATOR_SUPPLY("usb_bat_chg", "tegra-udc.0"),
+};
+
 static struct max77665_charger_plat_data max77665_charger = {
        .fast_chg_cc = 2000, /* fast charger current*/
        .term_volt = 4200, /* charger termination voltage */
@@ -236,6 +240,8 @@ static struct max77665_charger_plat_data max77665_charger = {
        .extcon_name = "tegra-udc",
        .update_status = max17042_update_status,
        .is_battery_present = false, /* false as default */
+       .consumer_supplies = max77665_charger_supply,
+       .num_consumer_supplies = ARRAY_SIZE(max77665_charger_supply),
 };
 
 static struct max77665_muic_platform_data max77665_muic = {