diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-15 12:32:47 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-15 12:32:47 -0400 |
commit | 9ced9f03d12d7539e86b0bff5bc750153c976c34 (patch) | |
tree | dcb8a23b0245d3d4d2719d7ea987f7eee608c553 /arch/arm/mach-s5pc100 | |
parent | 9b963f32c38b4c7d2da667e4458967b550f30bee (diff) | |
parent | b0b6ff0b21057bb8e58b0be8b427a4713fd4b5a5 (diff) |
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable
Conflicts:
arch/arm/mm/Kconfig
Diffstat (limited to 'arch/arm/mach-s5pc100')
-rw-r--r-- | arch/arm/mach-s5pc100/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/gpiolib.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s5pc100/mach-smdkc100.c | 48 |
3 files changed, 46 insertions, 4 deletions
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index b8fbf2fcba6f..608722ff4f28 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
@@ -58,6 +58,7 @@ config MACH_SMDKC100 | |||
58 | select SAMSUNG_DEV_ADC | 58 | select SAMSUNG_DEV_ADC |
59 | select SAMSUNG_DEV_IDE | 59 | select SAMSUNG_DEV_IDE |
60 | select SAMSUNG_DEV_KEYPAD | 60 | select SAMSUNG_DEV_KEYPAD |
61 | select SAMSUNG_DEV_PWM | ||
61 | select SAMSUNG_DEV_TS | 62 | select SAMSUNG_DEV_TS |
62 | select S5PC100_SETUP_FB_24BPP | 63 | select S5PC100_SETUP_FB_24BPP |
63 | select S5PC100_SETUP_I2C1 | 64 | select S5PC100_SETUP_I2C1 |
diff --git a/arch/arm/mach-s5pc100/gpiolib.c b/arch/arm/mach-s5pc100/gpiolib.c index 20856eb7dd51..2842394b28b5 100644 --- a/arch/arm/mach-s5pc100/gpiolib.c +++ b/arch/arm/mach-s5pc100/gpiolib.c | |||
@@ -348,6 +348,7 @@ static __init int s5pc100_gpiolib_init(void) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips, nr_chips); | 350 | samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips, nr_chips); |
351 | s5p_register_gpioint_bank(IRQ_GPIOINT, 0, S5P_GPIOINT_GROUP_MAXNR); | ||
351 | 352 | ||
352 | return 0; | 353 | return 0; |
353 | } | 354 | } |
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index dd192a27524d..0525cb3ef406 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -23,12 +23,15 @@ | |||
23 | #include <linux/fb.h> | 23 | #include <linux/fb.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/pwm_backlight.h> | ||
26 | 27 | ||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
29 | 30 | ||
30 | #include <mach/map.h> | 31 | #include <mach/map.h> |
31 | #include <mach/regs-fb.h> | 32 | #include <mach/regs-fb.h> |
33 | #include <mach/regs-gpio.h> | ||
34 | |||
32 | #include <video/platform_lcd.h> | 35 | #include <video/platform_lcd.h> |
33 | 36 | ||
34 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
@@ -107,9 +110,6 @@ static struct i2c_board_info i2c_devs1[] __initdata = { | |||
107 | static void smdkc100_lcd_power_set(struct plat_lcd_data *pd, | 110 | static void smdkc100_lcd_power_set(struct plat_lcd_data *pd, |
108 | unsigned int power) | 111 | unsigned int power) |
109 | { | 112 | { |
110 | /* backlight */ | ||
111 | gpio_direction_output(S5PC100_GPD(0), power); | ||
112 | |||
113 | if (power) { | 113 | if (power) { |
114 | /* module reset */ | 114 | /* module reset */ |
115 | gpio_direction_output(S5PC100_GPH0(6), 1); | 115 | gpio_direction_output(S5PC100_GPH0(6), 1); |
@@ -179,6 +179,45 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = { | |||
179 | .cols = 8, | 179 | .cols = 8, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | static int smdkc100_backlight_init(struct device *dev) | ||
183 | { | ||
184 | int ret; | ||
185 | |||
186 | ret = gpio_request(S5PC100_GPD(0), "Backlight"); | ||
187 | if (ret) { | ||
188 | printk(KERN_ERR "failed to request GPF for PWM-OUT0\n"); | ||
189 | return ret; | ||
190 | } | ||
191 | |||
192 | /* Configure GPIO pin with S5PC100_GPD_TOUT_0 */ | ||
193 | s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_SFN(2)); | ||
194 | |||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static void smdkc100_backlight_exit(struct device *dev) | ||
199 | { | ||
200 | s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_OUTPUT); | ||
201 | gpio_free(S5PC100_GPD(0)); | ||
202 | } | ||
203 | |||
204 | static struct platform_pwm_backlight_data smdkc100_backlight_data = { | ||
205 | .pwm_id = 0, | ||
206 | .max_brightness = 255, | ||
207 | .dft_brightness = 255, | ||
208 | .pwm_period_ns = 78770, | ||
209 | .init = smdkc100_backlight_init, | ||
210 | .exit = smdkc100_backlight_exit, | ||
211 | }; | ||
212 | |||
213 | static struct platform_device smdkc100_backlight_device = { | ||
214 | .name = "pwm-backlight", | ||
215 | .dev = { | ||
216 | .parent = &s3c_device_timer[0].dev, | ||
217 | .platform_data = &smdkc100_backlight_data, | ||
218 | }, | ||
219 | }; | ||
220 | |||
182 | static struct platform_device *smdkc100_devices[] __initdata = { | 221 | static struct platform_device *smdkc100_devices[] __initdata = { |
183 | &s3c_device_adc, | 222 | &s3c_device_adc, |
184 | &s3c_device_cfcon, | 223 | &s3c_device_cfcon, |
@@ -200,6 +239,8 @@ static struct platform_device *smdkc100_devices[] __initdata = { | |||
200 | &s5p_device_fimc1, | 239 | &s5p_device_fimc1, |
201 | &s5p_device_fimc2, | 240 | &s5p_device_fimc2, |
202 | &s5pc100_device_spdif, | 241 | &s5pc100_device_spdif, |
242 | &s3c_device_timer[0], | ||
243 | &smdkc100_backlight_device, | ||
203 | }; | 244 | }; |
204 | 245 | ||
205 | static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | 246 | static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { |
@@ -233,7 +274,6 @@ static void __init smdkc100_machine_init(void) | |||
233 | s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD); | 274 | s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD); |
234 | 275 | ||
235 | /* LCD init */ | 276 | /* LCD init */ |
236 | gpio_request(S5PC100_GPD(0), "GPD"); | ||
237 | gpio_request(S5PC100_GPH0(6), "GPH0"); | 277 | gpio_request(S5PC100_GPH0(6), "GPH0"); |
238 | smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); | 278 | smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); |
239 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); | 279 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); |