diff options
author | Thierry Reding <thierry.reding@gmail.com> | 2013-12-20 04:46:52 -0500 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2014-02-10 22:33:09 -0500 |
commit | 902e6a0c7eba08ec978cea8304c6cb2ddce7b9dc (patch) | |
tree | 580a9e35a67b95342bf93482cbdf36b3cca89c3a | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
ARM: pxa: Add dummy backlight power supply on Mitac Mio A701
Recent changes to the pwm-backlight driver have made the power supply
mandatory. There is code in the regulator core to deal with situations
where no regulator is specified and provide a dummy, but that works on
DT-based boards only.
The situation can be remedied by adding a dummy regulator during board
initialization.
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index f70583fee59f..29997bde277d 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
39 | #include <linux/usb/gpio_vbus.h> | 39 | #include <linux/usb/gpio_vbus.h> |
40 | #include <linux/reboot.h> | 40 | #include <linux/reboot.h> |
41 | #include <linux/regulator/fixed.h> | ||
41 | #include <linux/regulator/max1586.h> | 42 | #include <linux/regulator/max1586.h> |
42 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
43 | #include <linux/i2c/pxa-i2c.h> | 44 | #include <linux/i2c/pxa-i2c.h> |
@@ -714,6 +715,10 @@ static struct gpio global_gpios[] = { | |||
714 | { GPIO56_MT9M111_nOE, GPIOF_OUT_INIT_LOW, "Camera nOE" }, | 715 | { GPIO56_MT9M111_nOE, GPIOF_OUT_INIT_LOW, "Camera nOE" }, |
715 | }; | 716 | }; |
716 | 717 | ||
718 | static struct regulator_consumer_supply fixed_5v0_consumers[] = { | ||
719 | REGULATOR_SUPPLY("power", "pwm-backlight"), | ||
720 | }; | ||
721 | |||
717 | static void __init mioa701_machine_init(void) | 722 | static void __init mioa701_machine_init(void) |
718 | { | 723 | { |
719 | int rc; | 724 | int rc; |
@@ -753,6 +758,10 @@ static void __init mioa701_machine_init(void) | |||
753 | pxa_set_i2c_info(&i2c_pdata); | 758 | pxa_set_i2c_info(&i2c_pdata); |
754 | pxa27x_set_i2c_power_info(NULL); | 759 | pxa27x_set_i2c_power_info(NULL); |
755 | pxa_set_camera_info(&mioa701_pxacamera_platform_data); | 760 | pxa_set_camera_info(&mioa701_pxacamera_platform_data); |
761 | |||
762 | regulator_register_always_on(0, "fixed-5.0V", fixed_5v0_consumers, | ||
763 | ARRAY_SIZE(fixed_5v0_consumers), | ||
764 | 5000000); | ||
756 | } | 765 | } |
757 | 766 | ||
758 | static void mioa701_machine_exit(void) | 767 | static void mioa701_machine_exit(void) |