diff mbox series

[-next,v3] drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h>

Message ID 20210408093822.207917-1-zhangjianhua18@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next,v3] drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h> | expand

Commit Message

Zhang Jianhua April 8, 2021, 9:38 a.m. UTC
If CONFIG_DRM_LONTIUM_LT8912B=m, the following errors will be seen while
compiling lontium-lt8912b.c

drivers/gpu/drm/bridge/lontium-lt8912b.c: In function
‘lt8912_hard_power_on’:
drivers/gpu/drm/bridge/lontium-lt8912b.c:252:2: error: implicit
declaration of function ‘gpiod_set_value_cansleep’; did you mean
‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
  gpiod_set_value_cansleep(lt->gp_reset, 0);
  ^~~~~~~~~~~~~~~~~~~~~~~~
  gpio_set_value_cansleep
drivers/gpu/drm/bridge/lontium-lt8912b.c: In function ‘lt8912_parse_dt’:
drivers/gpu/drm/bridge/lontium-lt8912b.c:628:13: error: implicit
declaration of function ‘devm_gpiod_get_optional’; did you mean
‘devm_gpio_request_one’? [-Werror=implicit-function-declaration]
  gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
             ^~~~~~~~~~~~~~~~~~~~~~~
             devm_gpio_request_one
drivers/gpu/drm/bridge/lontium-lt8912b.c:628:51: error: ‘GPIOD_OUT_HIGH’
undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
  gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
                                                   ^~~~~~~~~~~~~~
                                                   GPIOF_INIT_HIGH

Signed-off-by: Zhang Jianhua <zhangjianhua18@huawei.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
---
v2:
- add header file <linux/gpio/consumer.h> for lontium-lt8912b.c instead
  of add config dependence for CONFIG_DRM_LONTIUM_LT8912B
v3:
- change the #include in alphabetical order
---
 drivers/gpu/drm/bridge/lontium-lt8912b.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Robert Foss April 8, 2021, 9:47 a.m. UTC | #1
Pushed to https://cgit.freedesktop.org/drm/drm-misc/commit/?id=7513ce49027c8218a6fce7ec45c3289b903ba4bd


On Thu, 8 Apr 2021 at 11:38, Zhang Jianhua <zhangjianhua18@huawei.com> wrote:
>
> If CONFIG_DRM_LONTIUM_LT8912B=m, the following errors will be seen while
> compiling lontium-lt8912b.c
>
> drivers/gpu/drm/bridge/lontium-lt8912b.c: In function
> ‘lt8912_hard_power_on’:
> drivers/gpu/drm/bridge/lontium-lt8912b.c:252:2: error: implicit
> declaration of function ‘gpiod_set_value_cansleep’; did you mean
> ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>   gpiod_set_value_cansleep(lt->gp_reset, 0);
>   ^~~~~~~~~~~~~~~~~~~~~~~~
>   gpio_set_value_cansleep
> drivers/gpu/drm/bridge/lontium-lt8912b.c: In function ‘lt8912_parse_dt’:
> drivers/gpu/drm/bridge/lontium-lt8912b.c:628:13: error: implicit
> declaration of function ‘devm_gpiod_get_optional’; did you mean
> ‘devm_gpio_request_one’? [-Werror=implicit-function-declaration]
>   gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
>              ^~~~~~~~~~~~~~~~~~~~~~~
>              devm_gpio_request_one
> drivers/gpu/drm/bridge/lontium-lt8912b.c:628:51: error: ‘GPIOD_OUT_HIGH’
> undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>   gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
>                                                    ^~~~~~~~~~~~~~
>                                                    GPIOF_INIT_HIGH
>
> Signed-off-by: Zhang Jianhua <zhangjianhua18@huawei.com>
> Reviewed-by: Robert Foss <robert.foss@linaro.org>
> ---
> v2:
> - add header file <linux/gpio/consumer.h> for lontium-lt8912b.c instead
>   of add config dependence for CONFIG_DRM_LONTIUM_LT8912B
> v3:
> - change the #include in alphabetical order
> ---
>  drivers/gpu/drm/bridge/lontium-lt8912b.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> index 61491615bad0..4f693123985b 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> @@ -5,6 +5,7 @@
>
>  #include <linux/device.h>
>  #include <linux/delay.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/i2c.h>
>  #include <linux/gpio.h>
>  #include <linux/of_gpio.h>
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
index 61491615bad0..4f693123985b 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -5,6 +5,7 @@ 
 
 #include <linux/device.h>
 #include <linux/delay.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/gpio.h>
 #include <linux/of_gpio.h>