All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs
@ 2018-12-07 21:24 Russell King
  2018-12-07 21:39 ` Tony Lindgren
  2018-12-07 23:36 ` Uwe Kleine-König
  0 siblings, 2 replies; 3+ messages in thread
From: Russell King @ 2018-12-07 21:24 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Tony Lindgren, David Airlie, dri-devel

The binding document for this device says that all GPIOs are optional,
but the driver fails to bind on OMAP3 LDP, reporting:

panel-sharp-ls037v7dw01: probe of display failed with error -2

Unfortunately, commit ca8c67dafdb7 ("fbdev: omap2: improve usage of
gpiod API") removed the -ENOENT handling without converting the
gpiod function to use the optional variant, causing all GPIOs to become
mandatory.

Since the LDP hard-wires some of the panel control signals, there are
no GPIOs that could be specified in DT to satisfy this.

Switch the driver to use the devm_gpiod_get_index_optional() rather
than devm_gpiod_get_index() to conform to its binding documentation.

Fixes: ca8c67dafdb7 ("fbdev: omap2: improve usage of gpiod API")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
index 64b1369cb274..68f2f8d9c430 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
@@ -151,7 +151,7 @@ static  int sharp_ls_get_gpio_of(struct device *dev, int index, int val,
 
 	*gpiod = NULL;
 
-	gd = devm_gpiod_get_index(dev, desc, index, GPIOD_OUT_LOW);
+	gd = devm_gpiod_get_index_optional(dev, desc, index, GPIOD_OUT_LOW);
 	if (IS_ERR(gd))
 		return PTR_ERR(gd);
 
-- 
2.7.4

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

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

* Re: [PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs
  2018-12-07 21:24 [PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs Russell King
@ 2018-12-07 21:39 ` Tony Lindgren
  2018-12-07 23:36 ` Uwe Kleine-König
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2018-12-07 21:39 UTC (permalink / raw)
  To: Russell King
  Cc: David Airlie, Tomi Valkeinen, dri-devel, Uwe Kleine-König

* Russell King <rmk+kernel@armlinux.org.uk> [181207 21:24]:
> The binding document for this device says that all GPIOs are optional,
> but the driver fails to bind on OMAP3 LDP, reporting:
> 
> panel-sharp-ls037v7dw01: probe of display failed with error -2
> 
> Unfortunately, commit ca8c67dafdb7 ("fbdev: omap2: improve usage of
> gpiod API") removed the -ENOENT handling without converting the
> gpiod function to use the optional variant, causing all GPIOs to become
> mandatory.
> 
> Since the LDP hard-wires some of the panel control signals, there are
> no GPIOs that could be specified in DT to satisfy this.
> 
> Switch the driver to use the devm_gpiod_get_index_optional() rather
> than devm_gpiod_get_index() to conform to its binding documentation.
> 
> Fixes: ca8c67dafdb7 ("fbdev: omap2: improve usage of gpiod API")
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Acked-by: Tony Lindgren <tony@atomide.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs
  2018-12-07 21:24 [PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs Russell King
  2018-12-07 21:39 ` Tony Lindgren
@ 2018-12-07 23:36 ` Uwe Kleine-König
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2018-12-07 23:36 UTC (permalink / raw)
  To: Russell King; +Cc: Tony Lindgren, David Airlie, Tomi Valkeinen, dri-devel

On Fri, Dec 07, 2018 at 09:24:10PM +0000, Russell King wrote:
> The binding document for this device says that all GPIOs are optional,
> but the driver fails to bind on OMAP3 LDP, reporting:
> 
> panel-sharp-ls037v7dw01: probe of display failed with error -2
> 
> Unfortunately, commit ca8c67dafdb7 ("fbdev: omap2: improve usage of
> gpiod API") removed the -ENOENT handling without converting the
> gpiod function to use the optional variant, causing all GPIOs to become
> mandatory.
> 
> Since the LDP hard-wires some of the panel control signals, there are
> no GPIOs that could be specified in DT to satisfy this.
> 
> Switch the driver to use the devm_gpiod_get_index_optional() rather
> than devm_gpiod_get_index() to conform to its binding documentation.
> 
> Fixes: ca8c67dafdb7 ("fbdev: omap2: improve usage of gpiod API")
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Right, it seems I missed that the GPIOs were optional before
ca8c67dafdb7. Thanks for catching (and sorry for having to catch).

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-12-07 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07 21:24 [PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs Russell King
2018-12-07 21:39 ` Tony Lindgren
2018-12-07 23:36 ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.