diff options
Diffstat (limited to 'arch/arm/mach-pxa/zylonite.c')
-rw-r--r-- | arch/arm/mach-pxa/zylonite.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 4a0028087ea..66b446ca273 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -18,22 +18,24 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/pwm_backlight.h> | ||
21 | 22 | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <asm/hardware.h> | 25 | #include <asm/hardware.h> |
26 | #include <asm/arch/audio.h> | ||
25 | #include <asm/arch/gpio.h> | 27 | #include <asm/arch/gpio.h> |
26 | #include <asm/arch/pxafb.h> | 28 | #include <asm/arch/pxafb.h> |
27 | #include <asm/arch/zylonite.h> | 29 | #include <asm/arch/zylonite.h> |
28 | #include <asm/arch/mmc.h> | 30 | #include <asm/arch/mmc.h> |
29 | #include <asm/arch/pxa27x_keypad.h> | 31 | #include <asm/arch/pxa27x_keypad.h> |
30 | 32 | ||
33 | #include "devices.h" | ||
31 | #include "generic.h" | 34 | #include "generic.h" |
32 | 35 | ||
33 | #define MAX_SLOTS 3 | 36 | #define MAX_SLOTS 3 |
34 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; | 37 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; |
35 | 38 | ||
36 | int gpio_backlight; | ||
37 | int gpio_eth_irq; | 39 | int gpio_eth_irq; |
38 | 40 | ||
39 | int wm9713_irq; | 41 | int wm9713_irq; |
@@ -62,10 +64,20 @@ static struct platform_device smc91x_device = { | |||
62 | }; | 64 | }; |
63 | 65 | ||
64 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 66 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
65 | static void zylonite_backlight_power(int on) | 67 | static struct platform_pwm_backlight_data zylonite_backlight_data = { |
66 | { | 68 | .pwm_id = 3, |
67 | gpio_set_value(gpio_backlight, on); | 69 | .max_brightness = 100, |
68 | } | 70 | .dft_brightness = 100, |
71 | .pwm_period_ns = 10000, | ||
72 | }; | ||
73 | |||
74 | static struct platform_device zylonite_backlight_device = { | ||
75 | .name = "pwm-backlight", | ||
76 | .dev = { | ||
77 | .parent = &pxa27x_device_pwm1.dev, | ||
78 | .platform_data = &zylonite_backlight_data, | ||
79 | }, | ||
80 | }; | ||
69 | 81 | ||
70 | static struct pxafb_mode_info toshiba_ltm035a776c_mode = { | 82 | static struct pxafb_mode_info toshiba_ltm035a776c_mode = { |
71 | .pixclock = 110000, | 83 | .pixclock = 110000, |
@@ -98,7 +110,6 @@ static struct pxafb_mode_info toshiba_ltm04c380k_mode = { | |||
98 | static struct pxafb_mach_info zylonite_toshiba_lcd_info = { | 110 | static struct pxafb_mach_info zylonite_toshiba_lcd_info = { |
99 | .num_modes = 1, | 111 | .num_modes = 1, |
100 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, | 112 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
101 | .pxafb_backlight_power = zylonite_backlight_power, | ||
102 | }; | 113 | }; |
103 | 114 | ||
104 | static struct pxafb_mode_info sharp_ls037_modes[] = { | 115 | static struct pxafb_mode_info sharp_ls037_modes[] = { |
@@ -134,13 +145,11 @@ static struct pxafb_mach_info zylonite_sharp_lcd_info = { | |||
134 | .modes = sharp_ls037_modes, | 145 | .modes = sharp_ls037_modes, |
135 | .num_modes = 2, | 146 | .num_modes = 2, |
136 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, | 147 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
137 | .pxafb_backlight_power = zylonite_backlight_power, | ||
138 | }; | 148 | }; |
139 | 149 | ||
140 | static void __init zylonite_init_lcd(void) | 150 | static void __init zylonite_init_lcd(void) |
141 | { | 151 | { |
142 | /* backlight GPIO: output, default on */ | 152 | platform_device_register(&zylonite_backlight_device); |
143 | gpio_direction_output(gpio_backlight, 1); | ||
144 | 153 | ||
145 | if (lcd_id & 0x20) { | 154 | if (lcd_id & 0x20) { |
146 | set_pxa_fb_info(&zylonite_sharp_lcd_info); | 155 | set_pxa_fb_info(&zylonite_sharp_lcd_info); |
@@ -329,6 +338,7 @@ static void __init zylonite_init(void) | |||
329 | smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq); | 338 | smc91x_resources[1].end = gpio_to_irq(gpio_eth_irq); |
330 | platform_device_register(&smc91x_device); | 339 | platform_device_register(&smc91x_device); |
331 | 340 | ||
341 | pxa_set_ac97_info(NULL); | ||
332 | zylonite_init_lcd(); | 342 | zylonite_init_lcd(); |
333 | zylonite_init_mmc(); | 343 | zylonite_init_mmc(); |
334 | zylonite_init_keypad(); | 344 | zylonite_init_keypad(); |