From 4be18d0597602ad54fd5e6e23879dcf592a9df05 Mon Sep 17 00:00:00 2001 From: Rebecca Schultz Zavin Date: Tue, 10 Aug 2010 13:05:59 -0700 Subject: [PATCH] [ARM] tegra: Specifiy regulator by device name in stingray board file 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 --- arch/arm/mach-tegra/board-stingray-power.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-tegra/board-stingray-power.c b/arch/arm/mach-tegra/board-stingray-power.c index 7d4284fbfb78..98ac39625151 100644 --- a/arch/arm/mach-tegra/board-stingray-power.c +++ b/arch/arm/mach-tegra/board-stingray-power.c @@ -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[] = { -- 2.34.1