From: Rebecca Schultz Zavin Date: Tue, 10 Aug 2010 20:05:59 +0000 (-0700) Subject: [ARM] tegra: Specifiy regulator by device name in stingray board file X-Git-Tag: firefly_0821_release~9834^2~694 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4be18d0597602ad54fd5e6e23879dcf592a9df05;p=firefly-linux-kernel-4.4.55.git [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 --- 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[] = {