Revert "rk312x:lvds: add pull down lcdc io when the first time of system suspend"
authorzwl <zwl@rockchips.com>
Mon, 22 Sep 2014 13:09:46 +0000 (21:09 +0800)
committerzwl <zwl@rockchips.com>
Mon, 22 Sep 2014 13:09:46 +0000 (21:09 +0800)
This reverts commit ab3978515aeb5f845af17134950808bedbfbcd07.

arch/arm/boot/dts/rk3126-86v.dts
arch/arm/boot/dts/rk3126-sdk.dts
arch/arm/boot/dts/rk3128-sdk.dts
drivers/video/rockchip/transmitter/rk31xx_lvds.c

index 061735349a7511ff6890f1874b9c2000758ee62c..7ce872e8e825dfdce6091b08b88c4de652753420 100644 (file)
        pinctrl-names = "lcdc", "sleep";
        pinctrl-0 = <&lcdc0_lcdc_d>;
        pinctrl-1 = <&lcdc0_lcdc_gpio>;
-       lcdc-gpios = <&gpio2 GPIO_B4 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_B5 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_B6 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_B7 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_C0 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_C1 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_C2 GPIO_ACTIVE_LOW
-                       &gpio2 GPIO_C3 GPIO_ACTIVE_LOW>;
 };
 
 &lcdc {
index 1574f44f664dccef36dd7babf7a9f07529998b47..3049052774d0fa838fa13d924ad734a654858bdd 100755 (executable)
        pinctrl-names = "lcdc", "sleep";
        pinctrl-0 = <&lcdc0_lcdc_d>;
        pinctrl-1 = <&lcdc0_lcdc_gpio>;
-       lcdc-gpios = <&gpio2 GPIO_B4 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_B5 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_B6 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_B7 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C0 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C1 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C2 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C3 GPIO_ACTIVE_LOW>;
 };
 
 &lcdc {
index 669f6e30d91b5d776d8346412ad3a1ce01bc7949..99a0d15254456053f567041ca6488d4336984194 100755 (executable)
        pinctrl-names = "lcdc", "sleep";
        pinctrl-0 = <&lcdc0_lcdc_d>;
        pinctrl-1 = <&lcdc0_lcdc_gpio>;
-       lcdc-gpios = <&gpio2 GPIO_B4 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_B5 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_B6 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_B7 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C0 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C1 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C2 GPIO_ACTIVE_LOW
-                        &gpio2 GPIO_C3 GPIO_ACTIVE_LOW>;
 };
 
 &lcdc {
index dea0fa634dead4be41826c8d88fef0f8dbf6ff0c..50cfdab62f2afc69f4401ee2928ddac3741af6ab 100755 (executable)
 #include <linux/rockchip/grf.h>
 #include "rk31xx_lvds.h"
 
-#ifdef CONFIG_OF
-#include <linux/of.h>
-#include <linux/of_platform.h>
-#include <linux/of_gpio.h>
-#endif
-
 
 #define grf_readl(offset)      readl_relaxed(RK_GRF_VIRT + offset)
 #define grf_writel(v,offset)                                    \
@@ -112,44 +106,6 @@ static int rk31xx_lvds_pwr_off(void)
         return 0;
 }
 
-static int rk31xx_lvds_pull_down_io(void)
-{
-       int gpio;
-       int i = 0, gpio_nums = 0, val = 0;
-       enum of_gpio_flags flags;
-       char gpio_name[20] = {0};
-       struct rk_lvds_device *lvds = rk31xx_lvds;
-       static bool pull_down = false;
-
-        if (unlikely(!lvds) || !lvds->sys_state)
-                return 0;
-
-       if (pull_down)
-               return 0;
-
-       gpio_nums = of_gpio_named_count(lvds->dev->of_node, "lcdc-gpios");
-       if (gpio_nums > 0) {
-               for (i = 0; i < gpio_nums; i++) {
-                       gpio = of_get_named_gpio_flags(lvds->dev->of_node,
-                                                      "lcdc-gpios", i, &flags);
-                       if (!gpio_is_valid(gpio))
-                               continue;
-                       val = !(flags & OF_GPIO_ACTIVE_LOW);
-                       sprintf(gpio_name, "lcdc-gpio%d", i);
-                       if (!gpio_request(gpio, gpio_name)) {
-                               gpio_direction_output(gpio, val);
-                               msleep(1);
-                       } else {
-                               dev_err(lvds->dev, "request %s gpio fail!\n",
-                                       gpio_name);
-                       }
-               }
-       }
-       pull_down = true;
-
-       return 0;
-}
-
 static int rk31xx_lvds_disable(void)
 {
        struct rk_lvds_device *lvds = rk31xx_lvds;
@@ -171,7 +127,6 @@ static int rk31xx_lvds_disable(void)
                         pinctrl_select_state(lvds->pins->p,
                                              lvds->pins->sleep_state);
                 }
-               rk31xx_lvds_pull_down_io();
         }
 #endif
         lvds->sys_state = false;