|
@@ -29,6 +29,7 @@
|
|
|
#include <linux/smsc911x.h>
|
|
|
#include <linux/regulator/fixed.h>
|
|
|
#include <linux/regulator/machine.h>
|
|
|
+#include <linux/pwm_backlight.h>
|
|
|
|
|
|
#ifdef CONFIG_SMDK6410_WM1190_EV1
|
|
|
#include <linux/mfd/wm8350/core.h>
|
|
@@ -49,6 +50,7 @@
|
|
|
#include <mach/hardware.h>
|
|
|
#include <mach/regs-fb.h>
|
|
|
#include <mach/map.h>
|
|
|
+#include <mach/gpio-bank-f.h>
|
|
|
|
|
|
#include <asm/irq.h>
|
|
|
#include <asm/mach-types.h>
|
|
@@ -119,7 +121,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
|
|
|
{
|
|
|
if (power) {
|
|
|
gpio_direction_output(S3C64XX_GPF(13), 1);
|
|
|
- gpio_direction_output(S3C64XX_GPF(15), 1);
|
|
|
|
|
|
/* fire nRESET on power up */
|
|
|
gpio_direction_output(S3C64XX_GPN(5), 0);
|
|
@@ -127,7 +128,6 @@ static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
|
|
|
gpio_direction_output(S3C64XX_GPN(5), 1);
|
|
|
msleep(1);
|
|
|
} else {
|
|
|
- gpio_direction_output(S3C64XX_GPF(15), 0);
|
|
|
gpio_direction_output(S3C64XX_GPF(13), 0);
|
|
|
}
|
|
|
}
|
|
@@ -270,6 +270,45 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
|
|
|
.cols = 8,
|
|
|
};
|
|
|
|
|
|
+static int smdk6410_backlight_init(struct device *dev)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ ret = gpio_request(S3C64XX_GPF(15), "Backlight");
|
|
|
+ if (ret) {
|
|
|
+ printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
|
|
|
+ s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static void smdk6410_backlight_exit(struct device *dev)
|
|
|
+{
|
|
|
+ s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT);
|
|
|
+ gpio_free(S3C64XX_GPF(15));
|
|
|
+}
|
|
|
+
|
|
|
+static struct platform_pwm_backlight_data smdk6410_backlight_data = {
|
|
|
+ .pwm_id = 1,
|
|
|
+ .max_brightness = 255,
|
|
|
+ .dft_brightness = 255,
|
|
|
+ .pwm_period_ns = 78770,
|
|
|
+ .init = smdk6410_backlight_init,
|
|
|
+ .exit = smdk6410_backlight_exit,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device smdk6410_backlight_device = {
|
|
|
+ .name = "pwm-backlight",
|
|
|
+ .dev = {
|
|
|
+ .parent = &s3c_device_timer[1].dev,
|
|
|
+ .platform_data = &smdk6410_backlight_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
static struct map_desc smdk6410_iodesc[] = {};
|
|
|
|
|
|
static struct platform_device *smdk6410_devices[] __initdata = {
|
|
@@ -299,6 +338,8 @@ static struct platform_device *smdk6410_devices[] __initdata = {
|
|
|
&s3c_device_rtc,
|
|
|
&s3c_device_ts,
|
|
|
&s3c_device_wdt,
|
|
|
+ &s3c_device_timer[1],
|
|
|
+ &smdk6410_backlight_device,
|
|
|
};
|
|
|
|
|
|
#ifdef CONFIG_REGULATOR
|
|
@@ -694,7 +735,6 @@ static void __init smdk6410_machine_init(void)
|
|
|
|
|
|
gpio_request(S3C64XX_GPN(5), "LCD power");
|
|
|
gpio_request(S3C64XX_GPF(13), "LCD power");
|
|
|
- gpio_request(S3C64XX_GPF(15), "LCD power");
|
|
|
|
|
|
i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
|
|
|
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
|