Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: tlv320adcx140: Propagate error codes during probe

When scanning for the reset pin, we could get an -EPROBE_DEFER.
The driver would assume that no reset pin had been defined,
which would mean that the chip would never be powered.

Now we both respect any error we get from devm_gpiod_get_optional.
We also now properly report the missing GPIO definition when
'gpio_reset' is NULL.

Signed-off-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-3-8f7ecec525c8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dimitrios Katsaros and committed by
Mark Brown
d89aad92 be7664c8

+3
+3
sound/soc/codecs/tlv320adcx140.c
··· 1154 1154 adcx140->gpio_reset = devm_gpiod_get_optional(adcx140->dev, 1155 1155 "reset", GPIOD_OUT_LOW); 1156 1156 if (IS_ERR(adcx140->gpio_reset)) 1157 + return dev_err_probe(&i2c->dev, PTR_ERR(adcx140->gpio_reset), 1158 + "Failed to get Reset GPIO\n"); 1159 + if (!adcx140->gpio_reset) 1157 1160 dev_info(&i2c->dev, "Reset GPIO not defined\n"); 1158 1161 1159 1162 adcx140->supply_areg = devm_regulator_get_optional(adcx140->dev,