If GPIOLIB=n and asm-generic/gpio.h is not used:
drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’: drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’: drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast
Add the missing #include <linux/gpio/consumer.h> to fix this.
As the resulting driver won't work with GPIOLIB=n anyway, make DRM_PTN3460 depend on GPIOLIB || COMPILE_TEST.
Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/bridge/Kconfig | 4 ++-- drivers/gpu/drm/bridge/ptn3460.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index acef3223772cb899..6cdcd2ec4848edec 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -5,8 +5,8 @@ config DRM_DW_HDMI
config DRM_PTN3460 tristate "PTN3460 DP/LVDS bridge" - depends on DRM - depends on OF + depends on DRM && OF + depends on GPIOLIB || COMPILE_TEST select DRM_KMS_HELPER select DRM_PANEL ---help--- diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c index 9d2f053382e1889a..63a09e4079f358ff 100644 --- a/drivers/gpu/drm/bridge/ptn3460.c +++ b/drivers/gpu/drm/bridge/ptn3460.c @@ -15,6 +15,7 @@
#include <linux/delay.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/module.h> #include <linux/of.h>
If GPIOLIB=n and asm-generic/gpio.h is not used:
drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_pre_enable’: drivers/gpu/drm/bridge/ps8622.c:368: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_probe’: drivers/gpu/drm/bridge/ps8622.c:584: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ps8622.c:584: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ps8622.c:590: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ps8622.c:596: warning: assignment makes pointer from integer without a cast
Add the missing #include <linux/gpio/consumer.h> to fix this.
As the resulting driver won't work with GPIOLIB=n anyway, make DRM_PS8622 depend on GPIOLIB || COMPILE_TEST.
Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/bridge/Kconfig | 4 ++-- drivers/gpu/drm/bridge/ps8622.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 6cdcd2ec4848edec..3e562d3f37973efc 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -14,8 +14,8 @@ config DRM_PTN3460
config DRM_PS8622 tristate "Parade eDP/LVDS bridge" - depends on DRM - depends on OF + depends on DRM && OF + depends on GPIOLIB || COMPILE_TEST select DRM_PANEL select DRM_KMS_HELPER select BACKLIGHT_LCD_SUPPORT diff --git a/drivers/gpu/drm/bridge/ps8622.c b/drivers/gpu/drm/bridge/ps8622.c index e895aa7ea353164a..a9c38f8edf172bb9 100644 --- a/drivers/gpu/drm/bridge/ps8622.c +++ b/drivers/gpu/drm/bridge/ps8622.c @@ -18,6 +18,7 @@ #include <linux/err.h> #include <linux/fb.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/module.h> #include <linux/of.h>
On Tue, May 05, 2015 at 06:32:18PM +0200, Geert Uytterhoeven wrote:
If GPIOLIB=n and asm-generic/gpio.h is not used:
drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_pre_enable’: drivers/gpu/drm/bridge/ps8622.c:368: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_probe’: drivers/gpu/drm/bridge/ps8622.c:584: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ps8622.c:584: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ps8622.c:590: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ps8622.c:596: warning: assignment makes pointer from integer without a cast
Add the missing #include <linux/gpio/consumer.h> to fix this.
As the resulting driver won't work with GPIOLIB=n anyway, make DRM_PS8622 depend on GPIOLIB || COMPILE_TEST.
Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org
drivers/gpu/drm/bridge/Kconfig | 4 ++-- drivers/gpu/drm/bridge/ps8622.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks. With the same modifications as patch 1/27. I wonder if there's any reason to keep the linux/gpio.h include, since consumer.h seems to expose all the API that the drivers need.
Thierry
On Tue, May 05, 2015 at 06:32:17PM +0200, Geert Uytterhoeven wrote:
If GPIOLIB=n and asm-generic/gpio.h is not used:
drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’: drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’: drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast
Add the missing #include <linux/gpio/consumer.h> to fix this.
As the resulting driver won't work with GPIOLIB=n anyway, make DRM_PTN3460 depend on GPIOLIB || COMPILE_TEST.
Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org
drivers/gpu/drm/bridge/Kconfig | 4 ++-- drivers/gpu/drm/bridge/ptn3460.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks. Note that I dropped the part about adding the GPIOLIB dependency because that had been attempted previously to fix this, but it causes recursive dependencies on PowerPC (ppc64_defconfig). I don't know of a way to untangle those (I tried and failed miserably), so I think adding the include is really as good as it'll get.
Thierry
Hi Thierry,
On Fri, Jun 5, 2015 at 1:20 PM, Thierry Reding thierry.reding@gmail.com wrote:
On Tue, May 05, 2015 at 06:32:17PM +0200, Geert Uytterhoeven wrote:
If GPIOLIB=n and asm-generic/gpio.h is not used:
drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’: drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’ drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’: drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’ drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’ drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast
Add the missing #include <linux/gpio/consumer.h> to fix this.
As the resulting driver won't work with GPIOLIB=n anyway, make DRM_PTN3460 depend on GPIOLIB || COMPILE_TEST.
Signed-off-by: Geert Uytterhoeven geert@linux-m68k.org Cc: David Airlie airlied@linux.ie Cc: dri-devel@lists.freedesktop.org
drivers/gpu/drm/bridge/Kconfig | 4 ++-- drivers/gpu/drm/bridge/ptn3460.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks. Note that I dropped the part about adding the GPIOLIB dependency because that had been attempted previously to fix this, but it causes recursive dependencies on PowerPC (ppc64_defconfig). I don't know of a way to untangle those (I tried and failed miserably), so I think adding the include is really as good as it'll get.
Thanks!
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
dri-devel@lists.freedesktop.org