pwm-backlight: reset to unpstream version
author黄涛 <huangtao@rock-chips.com>
Tue, 25 Feb 2014 08:55:47 +0000 (16:55 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 25 Feb 2014 08:55:47 +0000 (16:55 +0800)
drivers/video/backlight/pwm_bl.c
include/linux/pwm_backlight.h

index 7dd9b2be7c859fc4751526cbf7f9130a4f13f88f..1fea627394d7c419107506d2b29d4cd052ea3b59 100644 (file)
@@ -20,8 +20,7 @@
 #include <linux/pwm.h>
 #include <linux/pwm_backlight.h>
 #include <linux/slab.h>
-#include <linux/of_gpio.h>
-#include <linux/gpio.h>
+
 struct pwm_bl_data {
        struct pwm_device       *pwm;
        struct device           *dev;
@@ -102,9 +101,7 @@ static int pwm_backlight_parse_dt(struct device *dev,
        struct property *prop;
        int length;
        u32 value;
-       int gpio,ret;
-        enum of_gpio_flags flags;
-
+       int ret;
 
        if (!node)
                return -ENODEV;
@@ -136,25 +133,6 @@ static int pwm_backlight_parse_dt(struct device *dev,
                                           &value);
                if (ret < 0)
                        return ret;
-               data->gpio = devm_kzalloc(dev,
-                               sizeof(struct gpio) * 1,
-                               GFP_KERNEL);
-               gpio = of_get_named_gpio_flags(node, "gpios", 0, &flags);
-               data->gpio->gpio = gpio;
-
-
-               if (gpio != -1) {
-                       ret = devm_gpio_request(dev, gpio, "gpio_pwm_bl_en");
-                       if(ret){
-                               data->gpio->gpio = -1;
-                               printk("PWM_BL_EN  request ERROR");
-                       }
-                       ret = gpio_direction_output(data->gpio->gpio , !flags);
-                       if(ret){
-                               printk("PWM_BL_EN  request ERROR");
-                       }
-
-               }
 
                data->dft_brightness = value;
                data->max_brightness--;
index 0e80289481f58ee277d069f3795930b1006dcc86..56f4a866539ad7b66476fc3d1c09d15ab8ad2be1 100644 (file)
@@ -13,9 +13,6 @@ struct platform_pwm_backlight_data {
        unsigned int lth_brightness;
        unsigned int pwm_period_ns;
        unsigned int *levels;
-
-       struct gpio *gpio;
-       
        int (*init)(struct device *dev);
        int (*notify)(struct device *dev, int brightness);
        void (*notify_after)(struct device *dev, int brightness);