diff mbox series

drm/bridge/tdp158: fix build failure

Message ID 20240904085206.3331553-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge/tdp158: fix build failure | expand

Commit Message

Jani Nikula Sept. 4, 2024, 8:52 a.m. UTC
ARCH=arm build fails with:

  CC [M]  drivers/gpu/drm/bridge/ti-tdp158.o
../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_enable’:
../drivers/gpu/drm/bridge/ti-tdp158.c:31:9: error: implicit declaration of function ‘gpiod_set_value_cansleep’ [-Werror=implicit-function-declaration]
   31 |         gpiod_set_value_cansleep(tdp158->enable, 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_probe’:
../drivers/gpu/drm/bridge/ti-tdp158.c:80:26: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
   80 |         tdp158->enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
      |                          devm_regulator_get_optional
../drivers/gpu/drm/bridge/ti-tdp158.c:80:65: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function)
   80 |         tdp158->enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
      |                                                                 ^~~~~~~~~~~~~
../drivers/gpu/drm/bridge/ti-tdp158.c:80:65: note: each undeclared identifier is reported only once for each function it appears in

Add the proper gpio consumer #include to fix this, and juggle the
include order to be a bit more pleasant on the eye while at it.

Fixes: a15710027afb ("drm/bridge: add support for TI TDP158")
Cc: Marc Gonzalez <mgonzalez@freebox.fr>
Cc: Robert Foss <rfoss@kernel.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/bridge/ti-tdp158.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Dmitry Baryshkov Sept. 4, 2024, 9:03 a.m. UTC | #1
On Wed, Sep 04, 2024 at 11:52:06AM GMT, Jani Nikula wrote:
> ARCH=arm build fails with:
> 
>   CC [M]  drivers/gpu/drm/bridge/ti-tdp158.o
> ../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_enable’:
> ../drivers/gpu/drm/bridge/ti-tdp158.c:31:9: error: implicit declaration of function ‘gpiod_set_value_cansleep’ [-Werror=implicit-function-declaration]
>    31 |         gpiod_set_value_cansleep(tdp158->enable, 1);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_probe’:
> ../drivers/gpu/drm/bridge/ti-tdp158.c:80:26: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
>    80 |         tdp158->enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
>       |                          ^~~~~~~~~~~~~~~~~~~~~~~
>       |                          devm_regulator_get_optional
> ../drivers/gpu/drm/bridge/ti-tdp158.c:80:65: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function)
>    80 |         tdp158->enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
>       |                                                                 ^~~~~~~~~~~~~
> ../drivers/gpu/drm/bridge/ti-tdp158.c:80:65: note: each undeclared identifier is reported only once for each function it appears in
> 
> Add the proper gpio consumer #include to fix this, and juggle the
> include order to be a bit more pleasant on the eye while at it.
> 
> Fixes: a15710027afb ("drm/bridge: add support for TI TDP158")
> Cc: Marc Gonzalez <mgonzalez@freebox.fr>
> Cc: Robert Foss <rfoss@kernel.org>
> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> Cc: Jonas Karlman <jonas@kwiboo.se>
> Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/bridge/ti-tdp158.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Jani Nikula Sept. 4, 2024, 9:21 a.m. UTC | #2
On Wed, 04 Sep 2024, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:
> On Wed, Sep 04, 2024 at 11:52:06AM GMT, Jani Nikula wrote:
>> ARCH=arm build fails with:
>> 
>>   CC [M]  drivers/gpu/drm/bridge/ti-tdp158.o
>> ../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_enable’:
>> ../drivers/gpu/drm/bridge/ti-tdp158.c:31:9: error: implicit declaration of function ‘gpiod_set_value_cansleep’ [-Werror=implicit-function-declaration]
>>    31 |         gpiod_set_value_cansleep(tdp158->enable, 1);
>>       |         ^~~~~~~~~~~~~~~~~~~~~~~~
>> ../drivers/gpu/drm/bridge/ti-tdp158.c: In function ‘tdp158_probe’:
>> ../drivers/gpu/drm/bridge/ti-tdp158.c:80:26: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
>>    80 |         tdp158->enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
>>       |                          ^~~~~~~~~~~~~~~~~~~~~~~
>>       |                          devm_regulator_get_optional
>> ../drivers/gpu/drm/bridge/ti-tdp158.c:80:65: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function)
>>    80 |         tdp158->enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
>>       |                                                                 ^~~~~~~~~~~~~
>> ../drivers/gpu/drm/bridge/ti-tdp158.c:80:65: note: each undeclared identifier is reported only once for each function it appears in
>> 
>> Add the proper gpio consumer #include to fix this, and juggle the
>> include order to be a bit more pleasant on the eye while at it.
>> 
>> Fixes: a15710027afb ("drm/bridge: add support for TI TDP158")
>> Cc: Marc Gonzalez <mgonzalez@freebox.fr>
>> Cc: Robert Foss <rfoss@kernel.org>
>> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
>> Cc: Neil Armstrong <neil.armstrong@linaro.org>
>> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
>> Cc: Jonas Karlman <jonas@kwiboo.se>
>> Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/bridge/ti-tdp158.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>> 
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Pushed to drm-misc-next, thanks for the review.

BR,
Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-tdp158.c b/drivers/gpu/drm/bridge/ti-tdp158.c
index 4ee0ad29874d..3472ed5924e8 100644
--- a/drivers/gpu/drm/bridge/ti-tdp158.c
+++ b/drivers/gpu/drm/bridge/ti-tdp158.c
@@ -2,10 +2,13 @@ 
 /*
  * Copyright 2024 Freebox SAS
  */
-#include <drm/drm_bridge.h>
-#include <drm/drm_atomic_helper.h>
+
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 
+#include <drm/drm_atomic_helper.h>
+#include <drm/drm_bridge.h>
+
 struct tdp158 {
 	struct drm_bridge bridge;
 	struct drm_bridge *next;