Skip to content

Commit

Permalink
drm/omap: include gpio/consumer.h where needed
Browse files Browse the repository at this point in the history
A lot of the display drivers for OMAP use the gpio descriptor functions
that are only available in linux/gpio.h if GPIOLIB is enabled and
otherwise produce a build error:

drivers/gpu/drm/omapdrm/displays/encoder-opa362.c: In function 'opa362_enable':
drivers/gpu/drm/omapdrm/displays/encoder-opa362.c:101:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
drivers/gpu/drm/omapdrm/displays/panel-dpi.c: In function 'panel_dpi_probe_pdata':
drivers/gpu/drm/omapdrm/displays/panel-dpi.c:189:23: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration]
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c: In function 'sharp_ls_enable':
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c:120:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]

This replaces the existing linux/gpio.h with linux/gpio/consumer.h
where needed. In case of panel-lgphilips-lb035q02.c however, we
also have to include linux/gpio.h to get the definition of gpio_is_valid
and gpio_set_value_cansleep that are used for the non-DT case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[tomi.valkeinen@ti.com: resolved conflicts]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Arnd Bergmann authored and Tomi Valkeinen committed May 31, 2016
1 parent 2d80245 commit d0196c8
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* the Free Software Foundation.
*/

#include <linux/gpio/consumer.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/platform_device.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* the Free Software Foundation.
*/

#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* the Free Software Foundation.
*/

#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/omapdrm/displays/panel-dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* the Free Software Foundation.
*/

#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/module.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/fb.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/of_gpio.h>

#include <video/omapdss.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/

#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <linux/sched.h>
#include <linux/backlight.h>
#include <linux/fb.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/of.h>
#include <linux/of_gpio.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/regulator/consumer.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/of_gpio.h>
Expand Down

0 comments on commit d0196c8

Please sign in to comment.