aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorPetr Cvek <petr.cvek@tul.cz>2015-09-28 17:40:57 -0400
committerRobert Jarzmik <robert.jarzmik@free.fr>2015-10-14 17:07:00 -0400
commite2f1b8b0ad1e8bd083241a79c179448ec7994b2a (patch)
treee171dfe2d39cf1cb8f3f11ae5958f5e462a3aff2 /arch/arm/mach-pxa
parent539122ad349af70a6780291f7c4a5d7bf17a5b59 (diff)
ARM: pxa: magician: Add missing regulator for PWM backlight
Add a fake regulator, which is required for the correct initialization of the PWM backlight driver. Signed-off-by: Petr Cvek <petr.cvek@tul.cz> Acked-by: Philipp Zabel <philipp.zabel@gmail.com> [ added a missing include for fixed regulator ] Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/magician.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index c32d760f8100..d77f95ddd198 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -27,6 +27,7 @@
27#include <linux/pwm.h> 27#include <linux/pwm.h>
28#include <linux/pwm_backlight.h> 28#include <linux/pwm_backlight.h>
29#include <linux/regulator/driver.h> 29#include <linux/regulator/driver.h>
30#include <linux/regulator/fixed.h>
30#include <linux/regulator/gpio-regulator.h> 31#include <linux/regulator/gpio-regulator.h>
31#include <linux/regulator/machine.h> 32#include <linux/regulator/machine.h>
32#include <linux/usb/gpio_vbus.h> 33#include <linux/usb/gpio_vbus.h>
@@ -346,6 +347,15 @@ static struct pwm_lookup magician_pwm_lookup[] = {
346 PWM_POLARITY_NORMAL), 347 PWM_POLARITY_NORMAL),
347}; 348};
348 349
350 /*
351 * fixed regulator for pwm_backlight
352 */
353
354static struct regulator_consumer_supply pwm_backlight_supply[] = {
355 REGULATOR_SUPPLY("power", "pwm_backlight"),
356};
357
358
349static struct gpio magician_bl_gpios[] = { 359static struct gpio magician_bl_gpios[] = {
350 { EGPIO_MAGICIAN_BL_POWER, GPIOF_DIR_OUT, "Backlight power" }, 360 { EGPIO_MAGICIAN_BL_POWER, GPIOF_DIR_OUT, "Backlight power" },
351 { EGPIO_MAGICIAN_BL_POWER2, GPIOF_DIR_OUT, "Backlight power 2" }, 361 { EGPIO_MAGICIAN_BL_POWER2, GPIOF_DIR_OUT, "Backlight power 2" },
@@ -867,6 +877,9 @@ static void __init magician_init(void)
867 lcd_select ? &samsung_info : &toppoly_info); 877 lcd_select ? &samsung_info : &toppoly_info);
868 } else 878 } else
869 pr_err("LCD detection: CPLD mapping failed\n"); 879 pr_err("LCD detection: CPLD mapping failed\n");
880
881 regulator_register_always_on(0, "power", pwm_backlight_supply,
882 ARRAY_SIZE(pwm_backlight_supply), 5000000);
870} 883}
871 884
872MACHINE_START(MAGICIAN, "HTC Magician") 885MACHINE_START(MAGICIAN, "HTC Magician")