summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2018-03-27 15:42:04 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-03-28 18:39:32 +0200
commitd7beb505ea993613fc5459676f16a777caf1e8c9 (patch)
tree8a936e17b36c9bc74b65a0151cdab808fdcfbdfc
parent32d0ca371882a85f439ada0e7f2846ed4b462ab8 (diff)
Revert "video: backlight: pwm_bl: add pwm_gpio"
This reverts commit 95730406a0e3bbd7f862718782924a3c367845a1.
-rw-r--r--arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c1
-rw-r--r--arch/arm/mach-tegra/panel-c-lvds-1366-14.c1
-rw-r--r--arch/arm/mach-tegra/panel-p-wuxga-10-1.c1
-rw-r--r--arch/arm/mach-tegra/panel-s-wqxga-10-1.c1
-rw-r--r--drivers/video/backlight/pwm_bl.c13
-rw-r--r--include/linux/pwm_backlight.h1
6 files changed, 0 insertions, 18 deletions
diff --git a/arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c b/arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c
index 2a647eabf261..be28e5061ed4 100644
--- a/arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c
+++ b/arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c
@@ -409,7 +409,6 @@ static struct platform_pwm_backlight_data edp_a_1080p_14_0_bl_data = {
.max_brightness = 255,
.dft_brightness = 224,
.pwm_period_ns = 1000000,
- .pwm_gpio = TEGRA_GPIO_INVALID,
.notify = edp_a_1080p_14_0_bl_notify,
/* Only toggle backlight on fb blank notifications for disp1 */
.check_fb = edp_a_1080p_14_0_check_fb,
diff --git a/arch/arm/mach-tegra/panel-c-lvds-1366-14.c b/arch/arm/mach-tegra/panel-c-lvds-1366-14.c
index cc9a3ba8bb73..e4a87540cef2 100644
--- a/arch/arm/mach-tegra/panel-c-lvds-1366-14.c
+++ b/arch/arm/mach-tegra/panel-c-lvds-1366-14.c
@@ -349,7 +349,6 @@ static struct platform_pwm_backlight_data lvds_c_1366_14_bl_data = {
.max_brightness = 255,
.dft_brightness = 224,
.pwm_period_ns = 1000000,
- .pwm_gpio = TEGRA_GPIO_INVALID,
.notify = lvds_c_1366_14_bl_notify,
/* Only toggle backlight on fb blank notifications for disp1 */
.check_fb = lvds_c_1366_14_check_fb,
diff --git a/arch/arm/mach-tegra/panel-p-wuxga-10-1.c b/arch/arm/mach-tegra/panel-p-wuxga-10-1.c
index cb77f4720229..ff14461c1334 100644
--- a/arch/arm/mach-tegra/panel-p-wuxga-10-1.c
+++ b/arch/arm/mach-tegra/panel-p-wuxga-10-1.c
@@ -580,7 +580,6 @@ static struct platform_pwm_backlight_data dsi_p_wuxga_10_1_bl_data = {
.max_brightness = 255,
.dft_brightness = 224,
.pwm_period_ns = 1000000,
- .pwm_gpio = TEGRA_GPIO_INVALID,
.notify = dsi_p_wuxga_10_1_bl_notify,
/* Only toggle backlight on fb blank notifications for disp1 */
.check_fb = dsi_p_wuxga_10_1_check_fb,
diff --git a/arch/arm/mach-tegra/panel-s-wqxga-10-1.c b/arch/arm/mach-tegra/panel-s-wqxga-10-1.c
index 1602b5f59ad6..a96bd8379e91 100644
--- a/arch/arm/mach-tegra/panel-s-wqxga-10-1.c
+++ b/arch/arm/mach-tegra/panel-s-wqxga-10-1.c
@@ -714,7 +714,6 @@ static struct platform_pwm_backlight_data dsi_s_wqxga_10_1_bl_data = {
.max_brightness = 255,
.dft_brightness = 224,
.pwm_period_ns = 1000000,
- .pwm_gpio = TEGRA_GPIO_INVALID,
.notify = dsi_s_wqxga_10_1_bl_notify,
/* Only toggle backlight on fb blank notifications for disp1 */
.check_fb = dsi_s_wqxga_10_1_check_fb,
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index f7be6f224d69..1fea627394d7 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -17,7 +17,6 @@
#include <linux/fb.h>
#include <linux/backlight.h>
#include <linux/err.h>
-#include <linux/gpio.h>
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
#include <linux/slab.h>
@@ -28,7 +27,6 @@ struct pwm_bl_data {
unsigned int period;
unsigned int lth_brightness;
unsigned int *levels;
- unsigned int pwm_gpio;
int (*notify)(struct device *,
int brightness);
void (*notify_after)(struct device *,
@@ -207,7 +205,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
pb->check_fb = data->check_fb;
pb->exit = data->exit;
pb->dev = &pdev->dev;
- pb->pwm_gpio = data->pwm_gpio;
pb->pwm = devm_pwm_get(&pdev->dev, NULL);
if (IS_ERR(pb->pwm)) {
@@ -237,13 +234,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = data->max_brightness;
-
- if (gpio_is_valid(pb->pwm_gpio)) {
- ret = gpio_request(pb->pwm_gpio, "disp_bl");
- if (ret)
- dev_err(&pdev->dev, "backlight gpio request failed\n");
- }
-
bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, pb,
&pwm_backlight_ops, &props);
if (IS_ERR(bl)) {
@@ -262,9 +252,6 @@ static int pwm_backlight_probe(struct platform_device *pdev)
bl->props.brightness = data->dft_brightness;
backlight_update_status(bl);
- if (gpio_is_valid(pb->pwm_gpio))
- gpio_free(pb->pwm_gpio);
-
platform_set_drvdata(pdev, bl);
return 0;
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h
index 0bb37c47aa0e..56f4a866539a 100644
--- a/include/linux/pwm_backlight.h
+++ b/include/linux/pwm_backlight.h
@@ -13,7 +13,6 @@ struct platform_pwm_backlight_data {
unsigned int lth_brightness;
unsigned int pwm_period_ns;
unsigned int *levels;
- unsigned int pwm_gpio;
int (*init)(struct device *dev);
int (*notify)(struct device *dev, int brightness);
void (*notify_after)(struct device *dev, int brightness);