From d7beb505ea993613fc5459676f16a777caf1e8c9 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Tue, 27 Mar 2018 15:42:04 +0200 Subject: Revert "video: backlight: pwm_bl: add pwm_gpio" This reverts commit 95730406a0e3bbd7f862718782924a3c367845a1. --- arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c | 1 - arch/arm/mach-tegra/panel-c-lvds-1366-14.c | 1 - arch/arm/mach-tegra/panel-p-wuxga-10-1.c | 1 - arch/arm/mach-tegra/panel-s-wqxga-10-1.c | 1 - drivers/video/backlight/pwm_bl.c | 13 ------------- include/linux/pwm_backlight.h | 1 - 6 files changed, 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 #include #include -#include #include #include #include @@ -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); -- cgit v1.2.3