aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig5
-rw-r--r--arch/arm/mach-s3c64xx/cpufreq.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c46
3 files changed, 47 insertions, 6 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 579d2f0f4dd0..e4177e22557b 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -143,6 +143,7 @@ config MACH_SMDK6410
143 select S3C_DEV_USB_HSOTG 143 select S3C_DEV_USB_HSOTG
144 select S3C_DEV_WDT 144 select S3C_DEV_WDT
145 select SAMSUNG_DEV_KEYPAD 145 select SAMSUNG_DEV_KEYPAD
146 select SAMSUNG_DEV_PWM
146 select HAVE_S3C2410_WATCHDOG if WATCHDOG 147 select HAVE_S3C2410_WATCHDOG if WATCHDOG
147 select S3C64XX_SETUP_SDHCI 148 select S3C64XX_SETUP_SDHCI
148 select S3C64XX_SETUP_I2C1 149 select S3C64XX_SETUP_I2C1
@@ -231,7 +232,7 @@ config MACH_HMT
231 select S3C_DEV_NAND 232 select S3C_DEV_NAND
232 select S3C_DEV_USB_HOST 233 select S3C_DEV_USB_HOST
233 select S3C64XX_SETUP_FB_24BPP 234 select S3C64XX_SETUP_FB_24BPP
234 select HAVE_PWM 235 select SAMSUNG_DEV_PWM
235 help 236 help
236 Machine support for the Airgoo HMT 237 Machine support for the Airgoo HMT
237 238
@@ -249,8 +250,8 @@ config MACH_SMARTQ
249 select S3C64XX_SETUP_SDHCI 250 select S3C64XX_SETUP_SDHCI
250 select S3C64XX_SETUP_FB_24BPP 251 select S3C64XX_SETUP_FB_24BPP
251 select SAMSUNG_DEV_ADC 252 select SAMSUNG_DEV_ADC
253 select SAMSUNG_DEV_PWM
252 select SAMSUNG_DEV_TS 254 select SAMSUNG_DEV_TS
253 select HAVE_PWM
254 help 255 help
255 Shared machine support for SmartQ 5/7 256 Shared machine support for SmartQ 5/7
256 257
diff --git a/arch/arm/mach-s3c64xx/cpufreq.c b/arch/arm/mach-s3c64xx/cpufreq.c
index 74c0e8347de5..4375b97588b8 100644
--- a/arch/arm/mach-s3c64xx/cpufreq.c
+++ b/arch/arm/mach-s3c64xx/cpufreq.c
@@ -181,7 +181,7 @@ static void __init s3c64xx_cpufreq_config_regulator(void)
181} 181}
182#endif 182#endif
183 183
184static int __init s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy) 184static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
185{ 185{
186 int ret; 186 int ret;
187 struct cpufreq_frequency_table *freq; 187 struct cpufreq_frequency_table *freq;
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index a80a3163dd30..686a4f270b12 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -29,6 +29,7 @@
29#include <linux/smsc911x.h> 29#include <linux/smsc911x.h>
30#include <linux/regulator/fixed.h> 30#include <linux/regulator/fixed.h>
31#include <linux/regulator/machine.h> 31#include <linux/regulator/machine.h>
32#include <linux/pwm_backlight.h>
32 33
33#ifdef CONFIG_SMDK6410_WM1190_EV1 34#ifdef CONFIG_SMDK6410_WM1190_EV1
34#include <linux/mfd/wm8350/core.h> 35#include <linux/mfd/wm8350/core.h>
@@ -49,6 +50,7 @@
49#include <mach/hardware.h> 50#include <mach/hardware.h>
50#include <mach/regs-fb.h> 51#include <mach/regs-fb.h>
51#include <mach/map.h> 52#include <mach/map.h>
53#include <mach/gpio-bank-f.h>
52 54
53#include <asm/irq.h> 55#include <asm/irq.h>
54#include <asm/mach-types.h> 56#include <asm/mach-types.h>
@@ -119,7 +121,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
119{ 121{
120 if (power) { 122 if (power) {
121 gpio_direction_output(S3C64XX_GPF(13), 1); 123 gpio_direction_output(S3C64XX_GPF(13), 1);
122 gpio_direction_output(S3C64XX_GPF(15), 1);
123 124
124 /* fire nRESET on power up */ 125 /* fire nRESET on power up */
125 gpio_direction_output(S3C64XX_GPN(5), 0); 126 gpio_direction_output(S3C64XX_GPN(5), 0);
@@ -127,7 +128,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
127 gpio_direction_output(S3C64XX_GPN(5), 1); 128 gpio_direction_output(S3C64XX_GPN(5), 1);
128 msleep(1); 129 msleep(1);
129 } else { 130 } else {
130 gpio_direction_output(S3C64XX_GPF(15), 0);
131 gpio_direction_output(S3C64XX_GPF(13), 0); 131 gpio_direction_output(S3C64XX_GPF(13), 0);
132 } 132 }
133} 133}
@@ -270,6 +270,45 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
270 .cols = 8, 270 .cols = 8,
271}; 271};
272 272
273static int smdk6410_backlight_init(struct device *dev)
274{
275 int ret;
276
277 ret = gpio_request(S3C64XX_GPF(15), "Backlight");
278 if (ret) {
279 printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
280 return ret;
281 }
282
283 /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
284 s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));
285
286 return 0;
287}
288
289static void smdk6410_backlight_exit(struct device *dev)
290{
291 s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT);
292 gpio_free(S3C64XX_GPF(15));
293}
294
295static struct platform_pwm_backlight_data smdk6410_backlight_data = {
296 .pwm_id = 1,
297 .max_brightness = 255,
298 .dft_brightness = 255,
299 .pwm_period_ns = 78770,
300 .init = smdk6410_backlight_init,
301 .exit = smdk6410_backlight_exit,
302};
303
304static struct platform_device smdk6410_backlight_device = {
305 .name = "pwm-backlight",
306 .dev = {
307 .parent = &s3c_device_timer[1].dev,
308 .platform_data = &smdk6410_backlight_data,
309 },
310};
311
273static struct map_desc smdk6410_iodesc[] = {}; 312static struct map_desc smdk6410_iodesc[] = {};
274 313
275static struct platform_device *smdk6410_devices[] __initdata = { 314static struct platform_device *smdk6410_devices[] __initdata = {
@@ -299,6 +338,8 @@ static struct platform_device *smdk6410_devices[] __initdata = {
299 &s3c_device_rtc, 338 &s3c_device_rtc,
300 &s3c_device_ts, 339 &s3c_device_ts,
301 &s3c_device_wdt, 340 &s3c_device_wdt,
341 &s3c_device_timer[1],
342 &smdk6410_backlight_device,
302}; 343};
303 344
304#ifdef CONFIG_REGULATOR 345#ifdef CONFIG_REGULATOR
@@ -694,7 +735,6 @@ static void __init smdk6410_machine_init(void)
694 735
695 gpio_request(S3C64XX_GPN(5), "LCD power"); 736 gpio_request(S3C64XX_GPN(5), "LCD power");
696 gpio_request(S3C64XX_GPF(13), "LCD power"); 737 gpio_request(S3C64XX_GPF(13), "LCD power");
697 gpio_request(S3C64XX_GPF(15), "LCD power");
698 738
699 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); 739 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
700 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); 740 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));