diff options
Diffstat (limited to 'arch/arm/mach-clps711x/edb7211.c')
| -rw-r--r-- | arch/arm/mach-clps711x/edb7211.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/edb7211.c b/arch/arm/mach-clps711x/edb7211.c index 81cc6835d7a5..d5832b3557a1 100644 --- a/arch/arm/mach-clps711x/edb7211.c +++ b/arch/arm/mach-clps711x/edb7211.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/memblock.h> | 13 | #include <linux/memblock.h> |
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
| 16 | #include <linux/backlight.h> | ||
| 16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
| 17 | 18 | ||
| 18 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
| @@ -30,6 +31,7 @@ | |||
| 30 | 31 | ||
| 31 | #define EDB7211_LCD_DC_DC_EN CLPS711X_GPIO(3, 1) | 32 | #define EDB7211_LCD_DC_DC_EN CLPS711X_GPIO(3, 1) |
| 32 | #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) | 33 | #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) |
| 34 | #define EDB7211_LCDBL CLPS711X_GPIO(3, 3) | ||
| 33 | 35 | ||
| 34 | #define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) | 36 | #define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) |
| 35 | #define EDB7211_CS8900_IRQ (IRQ_EINT3) | 37 | #define EDB7211_CS8900_IRQ (IRQ_EINT3) |
| @@ -56,9 +58,22 @@ static struct plat_lcd_data edb7211_lcd_power_pdata = { | |||
| 56 | .set_power = edb7211_lcd_power_set, | 58 | .set_power = edb7211_lcd_power_set, |
| 57 | }; | 59 | }; |
| 58 | 60 | ||
| 61 | static void edb7211_lcd_backlight_set_intensity(int intensity) | ||
| 62 | { | ||
| 63 | gpio_set_value(EDB7211_LCDBL, intensity); | ||
| 64 | } | ||
| 65 | |||
| 66 | static struct generic_bl_info edb7211_lcd_backlight_pdata = { | ||
| 67 | .name = "lcd-backlight.0", | ||
| 68 | .default_intensity = 0x01, | ||
| 69 | .max_intensity = 0x01, | ||
| 70 | .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | ||
| 71 | }; | ||
| 72 | |||
| 59 | static struct gpio edb7211_gpios[] __initconst = { | 73 | static struct gpio edb7211_gpios[] __initconst = { |
| 60 | { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, | 74 | { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, |
| 61 | { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, | 75 | { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, |
| 76 | { EDB7211_LCDBL, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT" }, | ||
| 62 | }; | 77 | }; |
| 63 | 78 | ||
| 64 | static struct map_desc edb7211_io_desc[] __initdata = { | 79 | static struct map_desc edb7211_io_desc[] __initdata = { |
| @@ -117,6 +132,9 @@ static void __init edb7211_init(void) | |||
| 117 | platform_device_register_data(&platform_bus, "platform-lcd", 0, | 132 | platform_device_register_data(&platform_bus, "platform-lcd", 0, |
| 118 | &edb7211_lcd_power_pdata, | 133 | &edb7211_lcd_power_pdata, |
| 119 | sizeof(edb7211_lcd_power_pdata)); | 134 | sizeof(edb7211_lcd_power_pdata)); |
| 135 | platform_device_register_data(&platform_bus, "generic-bl", 0, | ||
| 136 | &edb7211_lcd_backlight_pdata, | ||
| 137 | sizeof(edb7211_lcd_backlight_pdata)); | ||
| 120 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | 138 | platform_device_register_simple("video-clps711x", 0, NULL, 0); |
| 121 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | 139 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, |
| 122 | ARRAY_SIZE(edb7211_cs8900_resource)); | 140 | ARRAY_SIZE(edb7211_cs8900_resource)); |
