diff options
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 458f77bc473d..6dfb96cea293 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | |||
| @@ -15,9 +15,9 @@ | |||
| 15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
| 16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
| 17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
| 18 | #include <linux/gpio/consumer.h> | ||
| 18 | 19 | ||
| 19 | #include <video/omapdss.h> | 20 | #include "../dss/omapdss.h" |
| 20 | #include <video/omap-panel-data.h> | ||
| 21 | 21 | ||
| 22 | static struct omap_video_timings lb035q02_timings = { | 22 | static struct omap_video_timings lb035q02_timings = { |
| 23 | .x_res = 320, | 23 | .x_res = 320, |
| @@ -50,9 +50,6 @@ struct panel_drv_data { | |||
| 50 | 50 | ||
| 51 | struct omap_video_timings videomode; | 51 | struct omap_video_timings videomode; |
| 52 | 52 | ||
| 53 | /* used for non-DT boot, to be removed */ | ||
| 54 | int backlight_gpio; | ||
| 55 | |||
| 56 | struct gpio_desc *enable_gpio; | 53 | struct gpio_desc *enable_gpio; |
| 57 | }; | 54 | }; |
| 58 | 55 | ||
| @@ -170,9 +167,6 @@ static int lb035q02_enable(struct omap_dss_device *dssdev) | |||
| 170 | if (ddata->enable_gpio) | 167 | if (ddata->enable_gpio) |
| 171 | gpiod_set_value_cansleep(ddata->enable_gpio, 1); | 168 | gpiod_set_value_cansleep(ddata->enable_gpio, 1); |
| 172 | 169 | ||
| 173 | if (gpio_is_valid(ddata->backlight_gpio)) | ||
| 174 | gpio_set_value_cansleep(ddata->backlight_gpio, 1); | ||
| 175 | |||
| 176 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | 170 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; |
| 177 | 171 | ||
| 178 | return 0; | 172 | return 0; |
| @@ -189,9 +183,6 @@ static void lb035q02_disable(struct omap_dss_device *dssdev) | |||
| 189 | if (ddata->enable_gpio) | 183 | if (ddata->enable_gpio) |
| 190 | gpiod_set_value_cansleep(ddata->enable_gpio, 0); | 184 | gpiod_set_value_cansleep(ddata->enable_gpio, 0); |
| 191 | 185 | ||
| 192 | if (gpio_is_valid(ddata->backlight_gpio)) | ||
| 193 | gpio_set_value_cansleep(ddata->backlight_gpio, 0); | ||
| 194 | |||
| 195 | in->ops.dpi->disable(in); | 186 | in->ops.dpi->disable(in); |
| 196 | 187 | ||
| 197 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 188 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
| @@ -255,8 +246,6 @@ static int lb035q02_probe_of(struct spi_device *spi) | |||
| 255 | 246 | ||
| 256 | ddata->enable_gpio = gpio; | 247 | ddata->enable_gpio = gpio; |
| 257 | 248 | ||
| 258 | ddata->backlight_gpio = -ENOENT; | ||
| 259 | |||
| 260 | in = omapdss_of_find_source_for_first_ep(node); | 249 | in = omapdss_of_find_source_for_first_ep(node); |
| 261 | if (IS_ERR(in)) { | 250 | if (IS_ERR(in)) { |
| 262 | dev_err(&spi->dev, "failed to find video source\n"); | 251 | dev_err(&spi->dev, "failed to find video source\n"); |
| @@ -289,13 +278,6 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi) | |||
| 289 | if (r) | 278 | if (r) |
| 290 | return r; | 279 | return r; |
| 291 | 280 | ||
| 292 | if (gpio_is_valid(ddata->backlight_gpio)) { | ||
| 293 | r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio, | ||
| 294 | GPIOF_OUT_INIT_LOW, "panel backlight"); | ||
| 295 | if (r) | ||
| 296 | goto err_gpio; | ||
| 297 | } | ||
| 298 | |||
| 299 | ddata->videomode = lb035q02_timings; | 281 | ddata->videomode = lb035q02_timings; |
| 300 | 282 | ||
| 301 | dssdev = &ddata->dssdev; | 283 | dssdev = &ddata->dssdev; |
| @@ -315,7 +297,6 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi) | |||
| 315 | return 0; | 297 | return 0; |
| 316 | 298 | ||
| 317 | err_reg: | 299 | err_reg: |
| 318 | err_gpio: | ||
| 319 | omap_dss_put_device(ddata->in); | 300 | omap_dss_put_device(ddata->in); |
| 320 | return r; | 301 | return r; |
| 321 | } | 302 | } |
