dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2] drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h>
@ 2021-04-08  3:54 Zhang Jianhua
  2021-04-08  8:30 ` Robert Foss
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Jianhua @ 2021-04-08  3:54 UTC (permalink / raw)
  To: adrien.grassein, a.hajda, narmstrong, robert.foss,
	Laurent.pinchart, jonas, jernej.skrabec, airlied, daniel,
	zhangjianhua18
  Cc: johnny.chenyi, linux-kernel, dri-devel, heying24

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>
---
v2:
- add header file <linux/gpio/consumer.h> for lontium-lt8912b.c instead
  of add config dependence for CONFIG_DRM_LONTIUM_LT8912B
---
 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..79845b3b19e1 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2018, The Linux Foundation. All rights reserved.
  */
 
+#include <linux/gpio/consumer.h>
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next v2] drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h>
  2021-04-08  3:54 [PATCH -next v2] drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h> Zhang Jianhua
@ 2021-04-08  8:30 ` Robert Foss
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Foss @ 2021-04-08  8:30 UTC (permalink / raw)
  To: Zhang Jianhua
  Cc: Jernej Skrabec, Jonas Karlman, David Airlie, Neil Armstrong,
	linux-kernel, dri-devel, Andrzej Hajda, Laurent Pinchart,
	johnny.chenyi, heying24, Adrien Grassein

Hey Zhang,


On Thu, 8 Apr 2021 at 05:54, 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>
> ---
> v2:
> - add header file <linux/gpio/consumer.h> for lontium-lt8912b.c instead
>   of add config dependence for CONFIG_DRM_LONTIUM_LT8912B
> ---
>  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..79845b3b19e1 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2018, The Linux Foundation. All rights reserved.
>   */
>
> +#include <linux/gpio/consumer.h>
>  #include <linux/device.h>
>  #include <linux/delay.h>
>  #include <linux/i2c.h>

Add this #include in alphabetical order. With this change, feel free
to add my r-b.

Reviewed-by: Robert Foss <robert.foss@linaro.org>

> --
> 2.17.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-08  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  3:54 [PATCH -next v2] drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h> Zhang Jianhua
2021-04-08  8:30 ` Robert Foss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).