* [PATCH] Input: ads7864 - Check return value of regulator enable
@ 2013-03-02 7:04 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2013-03-02 7:04 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, Mark Brown
At least print a warning if we can't power the device up.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/touchscreen/ads7846.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 4f702b3..e0c8b7a 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -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);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-02 7:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-02 7:04 [PATCH] Input: ads7864 - Check return value of regulator enable Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).