Skip to content

Commit 7cef813

Browse files
lucaceresoliBartosz Golaszewski
authored andcommitted
gpio: pca953x: log an error when failing to get the reset GPIO
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 <luca.ceresoli@bootlin.com> Fixes: 054ccde ("gpio: pca953x: Add optional reset gpio control") Link: https://lore.kernel.org/r/20241219-pca953x-log-no-reset-gpio-v1-1-9aa7bcc45ead@bootlin.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 83a9752 commit 7cef813

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)