diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 19:08:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-17 19:08:06 -0700 |
commit | 411f5c7a502769ccc0377c5ba36cb0b283847ba8 (patch) | |
tree | 2c3a29671e3f923de48c55f94194849264a7bf53 /arch/arm/mach-s5pc100 | |
parent | 6d7ed21d17e640b120b902a314143e5ef4917a70 (diff) | |
parent | 9ced9f03d12d7539e86b0bff5bc750153c976c34 (diff) | |
download | linux-411f5c7a502769ccc0377c5ba36cb0b283847ba8.tar.bz2 |
Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (289 commits)
davinci: DM644x EVM: register MUSB device earlier
davinci: add spi devices on tnetv107x evm
davinci: add ssp config for tnetv107x evm board
davinci: add tnetv107x ssp platform device
spi: add ti-ssp spi master driver
mfd: add driver for sequencer serial port
ARM: EXYNOS4: Implement Clock gating for System MMU
ARM: EXYNOS4: Enhancement of System MMU driver
ARM: EXYNOS4: Add support for gpio interrupts
ARM: S5P: Add function to register gpio interrupt bank data
ARM: S5P: Cleanup S5P gpio interrupt code
ARM: EXYNOS4: Add missing GPYx banks
ARM: S3C64XX: Fix section mismatch from cpufreq init
ARM: EXYNOS4: Add keypad device to the SMDKV310
ARM: EXYNOS4: Update clocks for keypad
ARM: EXYNOS4: Update keypad base address
ARM: EXYNOS4: Add keypad device helpers
ARM: EXYNOS4: Add support for SATA on ARMLEX4210
plat-nomadik: make GPIO interrupts work with cpuidle ApSleep
mach-u300: define a dummy filter function for coh901318
...
Fix up various conflicts in
- arch/arm/mach-exynos4/cpufreq.c
- arch/arm/mach-mxs/gpio.c
- drivers/net/Kconfig
- drivers/tty/serial/Kconfig
- drivers/tty/serial/Makefile
- drivers/usb/gadget/fsl_mxc_udc.c
- drivers/video/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 select SAMSUNG_DEV_ADC select SAMSUNG_DEV_IDE select SAMSUNG_DEV_KEYPAD + select SAMSUNG_DEV_PWM select SAMSUNG_DEV_TS select S5PC100_SETUP_FB_24BPP 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) } samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips, nr_chips); + s5p_register_gpioint_bank(IRQ_GPIOINT, 0, S5P_GPIOINT_GROUP_MAXNR); return 0; } 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 @@ #include <linux/fb.h> #include <linux/delay.h> #include <linux/input.h> +#include <linux/pwm_backlight.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <mach/map.h> #include <mach/regs-fb.h> +#include <mach/regs-gpio.h> + #include <video/platform_lcd.h> #include <asm/irq.h> @@ -107,9 +110,6 @@ static struct i2c_board_info i2c_devs1[] __initdata = { static void smdkc100_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) { - /* backlight */ - gpio_direction_output(S5PC100_GPD(0), power); - if (power) { /* module reset */ gpio_direction_output(S5PC100_GPH0(6), 1); @@ -179,6 +179,45 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = { .cols = 8, }; +static int smdkc100_backlight_init(struct device *dev) +{ + int ret; + + ret = gpio_request(S5PC100_GPD(0), "Backlight"); + if (ret) { + printk(KERN_ERR "failed to request GPF for PWM-OUT0\n"); + return ret; + } + + /* Configure GPIO pin with S5PC100_GPD_TOUT_0 */ + s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_SFN(2)); + + return 0; +} + +static void smdkc100_backlight_exit(struct device *dev) +{ + s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_OUTPUT); + gpio_free(S5PC100_GPD(0)); +} + +static struct platform_pwm_backlight_data smdkc100_backlight_data = { + .pwm_id = 0, + .max_brightness = 255, + .dft_brightness = 255, + .pwm_period_ns = 78770, + .init = smdkc100_backlight_init, + .exit = smdkc100_backlight_exit, +}; + +static struct platform_device smdkc100_backlight_device = { + .name = "pwm-backlight", + .dev = { + .parent = &s3c_device_timer[0].dev, + .platform_data = &smdkc100_backlight_data, + }, +}; + static struct platform_device *smdkc100_devices[] __initdata = { &s3c_device_adc, &s3c_device_cfcon, @@ -200,6 +239,8 @@ static struct platform_device *smdkc100_devices[] __initdata = { &s5p_device_fimc1, &s5p_device_fimc2, &s5pc100_device_spdif, + &s3c_device_timer[0], + &smdkc100_backlight_device, }; static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { @@ -233,7 +274,6 @@ static void __init smdkc100_machine_init(void) s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD); /* LCD init */ - gpio_request(S5PC100_GPD(0), "GPD"); gpio_request(S5PC100_GPH0(6), "GPH0"); smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); |