Input: ads7864 - Check return value of regulator enable
Subsystems (2)
PATCH 1/1 Input: ads7864 - Check return value of regulator enable
At least print a warning if we can't power the device up.
Signed-off-by Mark Brown <[email protected]>
--- drivers/input/touchscreen/ads7846.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/input/touchscreen/ads7846.c +6 -1
@@ -236,7 +236,12 @@ static void __ads7846_disable(struct ads7846 *ts)/* Must be called with ts->lock held */ static void __ads7846_enable (struct ads7846 *ts) { -regulator_enable (ts->reg); +int ret; + + ret =regulator_enable (ts->reg); +if (ret !=0 ) +dev_err (&ts->spi->dev,"Failed to enable supply: %d\n" , ret); +ads7846_restart (ts); }
Signature · 1 line
1.7.10.4