aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-mx27_3ds.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-31 20:11:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-31 20:30:54 -0400
commit0556dc340e5159cdff925a5ab7f3a72f49745661 (patch)
treecad2c9b013734b7968ce1a82667e34c294013495 /arch/arm/mach-imx/mach-mx27_3ds.c
parent2967b0ad3302d8627c0d99bfed4b8f167e21fdee (diff)
backlight: fix broken regulator API usage in l4f00242t03
The regulator support in the l4f00242t03 is very non-idiomatic. Rather than requesting the regulators based on the device name and the supply names used by the device the driver requires boards to pass system specific supply names around through platform data. The driver also conditionally requests the regulators based on this platform data, adding unneeded conditional code to the driver. Fix this by removing the platform data and converting to the standard idiom, also updating all in tree users of the driver. As no datasheet appears to be available for the LCD I'm guessing the names for the supplies based on the existing users and I've no ability to do anything more than compile test. The use of regulator_set_voltage() in the driver is also problematic, since fixed voltages are required the expectation would be that the voltages would be fixed in the constraints set by the machines rather than manually configured by the driver, but is less problematic. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-imx/mach-mx27_3ds.c')
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 2eafbac2c763..377230497dcc 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -241,7 +241,7 @@ static struct regulator_init_data gpo_init = {
241}; 241};
242 242
243static struct regulator_consumer_supply vmmc1_consumers[] = { 243static struct regulator_consumer_supply vmmc1_consumers[] = {
244 REGULATOR_SUPPLY("lcd_2v8", NULL), 244 REGULATOR_SUPPLY("vcore", "spi0.0"),
245}; 245};
246 246
247static struct regulator_init_data vmmc1_init = { 247static struct regulator_init_data vmmc1_init = {
@@ -257,7 +257,7 @@ static struct regulator_init_data vmmc1_init = {
257}; 257};
258 258
259static struct regulator_consumer_supply vgen_consumers[] = { 259static struct regulator_consumer_supply vgen_consumers[] = {
260 REGULATOR_SUPPLY("vdd_lcdio", NULL), 260 REGULATOR_SUPPLY("vdd", "spi0.0"),
261}; 261};
262 262
263static struct regulator_init_data vgen_init = { 263static struct regulator_init_data vgen_init = {
@@ -348,8 +348,6 @@ static const struct imx_fb_platform_data mx27_3ds_fb_data __initconst = {
348static struct l4f00242t03_pdata mx27_3ds_lcd_pdata = { 348static struct l4f00242t03_pdata mx27_3ds_lcd_pdata = {
349 .reset_gpio = LCD_RESET, 349 .reset_gpio = LCD_RESET,
350 .data_enable_gpio = LCD_ENABLE, 350 .data_enable_gpio = LCD_ENABLE,
351 .core_supply = "lcd_2v8",
352 .io_supply = "vdd_lcdio",
353}; 351};
354 352
355static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { 353static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {