Skip to content

Commit 1055cdd

Browse files
andy-shevgregkh
authored andcommitted
drm/panel: ili9341: Respect deferred probe
[ Upstream commit 740fc1e ] GPIO controller might not be available when driver is being probed. There are plenty of reasons why, one of which is deferred probe. Since GPIOs are optional, return any error code we got to the upper layer, including deferred probe. With that in mind, use dev_err_probe() in order to avoid spamming the logs. Fixes: 5a04227 ("drm/panel: Add ilitek ili9341 panel driver") Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent c6be538 commit 1055cdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panel/panel-ilitek-ili9341.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,11 @@ static int ili9341_probe(struct spi_device *spi)
715715

716716
reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
717717
if (IS_ERR(reset))
718-
dev_err(dev, "Failed to get gpio 'reset'\n");
718+
return dev_err_probe(dev, PTR_ERR(reset), "Failed to get gpio 'reset'\n");
719719

720720
dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW);
721721
if (IS_ERR(dc))
722-
dev_err(dev, "Failed to get gpio 'dc'\n");
722+
return dev_err_probe(dev, PTR_ERR(dc), "Failed to get gpio 'dc'\n");
723723

724724
if (!strcmp(id->name, "sf-tc240t-9370-t"))
725725
return ili9341_dpi_probe(spi, dc, reset);

0 commit comments

Comments
 (0)