arm: tegra: dalmore: add userspace regulator consumer for gps
Nagarjuna Kristam [Wed, 26 Sep 2012 07:47:14 +0000 (12:47 +0530)]
Bug 982624

Change-Id: I0927d4cb91c2cc5c347d8e9b0c405a8268397a6e
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
(cherry picked from commit 798601b66944ee712302acff3c1db0b5bb82b597)
Reviewed-on: http://git-master/r/147826
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-dalmore-power.c

index 90697e6..f06fabe 100644 (file)
@@ -1026,6 +1026,28 @@ static int __init dalmore_max77663_regulator_init(void)
        return 0;
 }
 
+static struct regulator_bulk_data dalmore_gps_regulator_supply[] = {
+       [0] = {
+               .supply = "vdd_gps_3v3",
+       },
+       [1] = {
+               .supply = "vdd_gps_1v8",
+       },
+};
+
+static struct regulator_userspace_consumer_data dalmore_gps_regulator_pdata = {
+       .num_supplies   = ARRAY_SIZE(dalmore_gps_regulator_supply),
+       .supplies       = dalmore_gps_regulator_supply,
+};
+
+static struct platform_device dalmore_gps_regulator_device = {
+       .name   = "reg-userspace-consumer",
+       .id     = 2,
+       .dev    = {
+                       .platform_data = &dalmore_gps_regulator_pdata,
+       },
+};
+
 static struct regulator_bulk_data dalmore_bt_regulator_supply[] = {
        [0] = {
                .supply = "vdd_bt_3v3",
@@ -1083,6 +1105,7 @@ int __init dalmore_regulator_init(void)
        i2c_register_board_info(4, tps51632_boardinfo, 1);
        platform_device_register(&dalmore_pda_power_device);
        platform_device_register(&dalmore_bt_regulator_device);
+       platform_device_register(&dalmore_gps_regulator_device);
        return 0;
 }