[ARM] tegra: Specifiy regulator by device name in stingray board file
authorRebecca Schultz Zavin <rebecca@android.com>
Tue, 10 Aug 2010 20:05:59 +0000 (13:05 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:33:38 +0000 (16:33 -0700)
This change adds the ability to specify a regulator by device name
and modifies one consumer to use this functionality.

Change-Id: I7f4df5f60458717049c3a8abe52d7eb0b99dad89
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
arch/arm/mach-tegra/board-stingray-power.c

index 7d4284fbfb78d317f82450e5549c45039b44242f..98ac39625151b13074cdd569d3ba3c6cd9f181a9 100644 (file)
@@ -326,7 +326,9 @@ unsigned short cpcap_regulator_off_mode_values[CPCAP_NUM_REGULATORS] = {
        [CPCAP_VAUDIO]   = 0x0000,
 };
 
-#define REGULATOR_CONSUMER(name, device) { .supply = name, .dev = device, }
+#define REGULATOR_CONSUMER(name, device) { .supply = name, .dev_name = device, }
+#define REGULATOR_CONSUMER_BY_DEVICE(name, device) \
+       { .supply = name, .dev = device, }
 
 struct regulator_consumer_supply cpcap_sw2_consumers[] = {
        REGULATOR_CONSUMER("sw2", NULL),
@@ -360,7 +362,7 @@ struct regulator_consumer_supply cpcap_vsdio_consumers[] = {
 };
 
 struct regulator_consumer_supply cpcap_vcsi_consumers[] = {
-       REGULATOR_CONSUMER("vcsi", NULL),
+       REGULATOR_CONSUMER("vcsi", "tegra_camera"),
 };
 
 struct regulator_consumer_supply cpcap_vwlan2_consumers[] = {
@@ -372,7 +374,7 @@ struct regulator_consumer_supply cpcap_vvib_consumers[] = {
 };
 
 struct regulator_consumer_supply cpcap_vusb_consumers[] = {
-       REGULATOR_CONSUMER("vusb", &cpcap_whisper_device.dev),
+       REGULATOR_CONSUMER_BY_DEVICE("vusb", &cpcap_whisper_device.dev),
 };
 
 struct regulator_consumer_supply cpcap_vaudio_consumers[] = {