rk3168:ds1006h: move key config to board-rk3168-ds1006h.c
authorkfx <kfx@rock-chips.com>
Mon, 31 Dec 2012 01:50:42 +0000 (09:50 +0800)
committerkfx <kfx@rock-chips.com>
Mon, 31 Dec 2012 01:50:42 +0000 (09:50 +0800)
arch/arm/mach-rk30/board-rk3168-ds1006h-key.c [deleted file]
arch/arm/mach-rk30/board-rk3168-ds1006h.c

diff --git a/arch/arm/mach-rk30/board-rk3168-ds1006h-key.c b/arch/arm/mach-rk30/board-rk3168-ds1006h-key.c
deleted file mode 100644 (file)
index ca29970..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <mach/gpio.h>
-#include <plat/key.h>
-
-#define EV_ENCALL                              KEY_F4
-#define EV_MENU                                        KEY_F1
-
-#define PRESS_LEV_LOW                  1
-#define PRESS_LEV_HIGH                 0
-
-static struct rk29_keys_button key_button[] = {
-       {
-               .desc   = "play",
-               .code   = KEY_POWER,
-               .gpio   = RK30_PIN0_PA4, 
-               .active_low = PRESS_LEV_LOW,
-               .wakeup = 1,
-       },
-       {
-               .desc   = "esc",
-               .code   = KEY_BACK,
-               .adc_value      = 1,
-               .gpio = INVALID_GPIO,
-               .active_low = PRESS_LEV_LOW,
-       },
-};
-struct rk29_keys_platform_data rk29_keys_pdata = {
-       .buttons        = key_button,
-       .nbuttons       = ARRAY_SIZE(key_button),
-       .chn    = 1,  //chn: 0-7, if do not use ADC,set 'chn' -1
-};
-
index 005401ba433dd6dfc7ef92ce1aede5acc061db84..30ad8afebbd56b6439148941dded1416d2c96c6f 100644 (file)
 #endif
 
 #include "board-rk3168-ds1006h-camera.c"
-#include "board-rk3168-ds1006h-key.c"
+#include <plat/key.h>
+
+static struct rk29_keys_button key_button[] = {
+       {
+               .desc   = "play",
+               .code   = KEY_POWER,
+               .gpio   = RK30_PIN0_PA4, 
+               .active_low = PRESS_LEV_LOW,
+               .wakeup = 1,
+       },
+       {
+               .desc   = "esc",
+               .code   = KEY_BACK,
+               .adc_value      = 1,
+               .gpio = INVALID_GPIO,
+               .active_low = PRESS_LEV_LOW,
+       },
+};
+struct rk29_keys_platform_data rk29_keys_pdata = {
+       .buttons        = key_button,
+       .nbuttons       = ARRAY_SIZE(key_button),
+       .chn    = 1,  //chn: 0-7, if do not use ADC,set 'chn' -1
+};
 
 #if defined(CONFIG_CT36X_TS)
 
@@ -123,7 +145,8 @@ static int rk29_backlight_io_init(void)
 {
        int ret = 0;
 
-       iomux_set(PWM_MODE);
+       int pwm_gpio;
+       //iomux_set(PWM_MODE);
 #ifdef  LCD_DISP_ON_PIN
        ret = gpio_request(BL_EN_PIN, NULL);
        if (ret != 0) {
@@ -133,6 +156,9 @@ static int rk29_backlight_io_init(void)
        gpio_direction_output(BL_EN_PIN, 0);
        gpio_set_value(BL_EN_PIN, BL_EN_VALUE);
 #endif
+       pwm_gpio = mode_to_gpio(PWM_MODE);
+       gpio_request(pwm_gpio, NULL);
+       gpio_direction_output(pwm_gpio, GPIO_HIGH);
        return ret;
 }