The enable GPIO may not be accessible on the panel, make it optional.
This is the case on 10" Raspberry Pi Touch Display 2.

Signed-off-by: Marek Vasut <[email protected]>
---
Cc: Conor Dooley <[email protected]>
Cc: Dave Stevenson <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Jessica Zhang <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Simona Vetter <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
 drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c 
b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
index 6d07fe901357e..219d048cb883f 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
@@ -787,7 +787,7 @@ static int ili9882t_add(struct ili9882t *ili)
        if (IS_ERR(ili->pp1800))
                return PTR_ERR(ili->pp1800);
 
-       ili->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
+       ili->enable_gpio = devm_gpiod_get_optional(dev, "enable", 
GPIOD_OUT_LOW);
        if (IS_ERR(ili->enable_gpio)) {
                dev_err(dev, "cannot get enable-gpios %ld\n",
                        PTR_ERR(ili->enable_gpio));
-- 
2.53.0

Reply via email to