Skip to content

Commit 218d45a

Browse files
lucaceresolimehmetb0
authored andcommitted
gpio: pca953x: log an error when failing to get the reset GPIO
BugLink: https://bugs.launchpad.net/bugs/2111953 [ Upstream commit 7cef813 ] When the dirver fails getting this GPIO, it fails silently. Log an error message to make debugging a lot easier by just reading dmesg. Signed-off-by: Luca Ceresoli <[email protected]> Fixes: 054ccde ("gpio: pca953x: Add optional reset gpio control") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent edd3132 commit 218d45a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpio-pca953x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,8 @@ static int pca953x_probe(struct i2c_client *client)
10881088
*/
10891089
reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
10901090
if (IS_ERR(reset_gpio))
1091-
return PTR_ERR(reset_gpio);
1091+
return dev_err_probe(dev, PTR_ERR(reset_gpio),
1092+
"Failed to get reset gpio\n");
10921093
}
10931094

10941095
chip->client = client;

0 commit comments

Comments
 (0)