public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
@ 2013-03-02  7:40 Mark Brown
  2013-03-05 19:03 ` Bryan Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-03-02  7:40 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie; +Cc: patches, linux-leds, linux-kernel, Mark Brown

Provide some trace, though the hardware is most likely non-functional if
this happens.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/leds/leds-wm8350.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
index ed15157..86bdab3 100644
--- a/drivers/leds/leds-wm8350.c
+++ b/drivers/leds/leds-wm8350.c
@@ -129,7 +129,11 @@ static void wm8350_led_disable(struct wm8350_led *led)
 	ret = regulator_disable(led->isink);
 	if (ret != 0) {
 		dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
-		regulator_enable(led->dcdc);
+		ret = regulator_enable(led->dcdc);
+		if (ret != 0) {
+			dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
+				ret);
+		}
 		return;
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] leds: wm8350: Complain if we fail to reenable DCDC
@ 2013-03-06  5:01 Mark Brown
  2013-03-06 17:50 ` Bryan Wu
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-03-06  5:01 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie; +Cc: patches, linux-leds, linux-kernel, Mark Brown

Provide some trace, though the hardware is most likely non-functional if
this happens.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/leds/leds-wm8350.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c
index ed15157..8a181d5 100644
--- a/drivers/leds/leds-wm8350.c
+++ b/drivers/leds/leds-wm8350.c
@@ -129,7 +129,10 @@ static void wm8350_led_disable(struct wm8350_led *led)
 	ret = regulator_disable(led->isink);
 	if (ret != 0) {
 		dev_err(led->cdev.dev, "Failed to disable ISINK: %d\n", ret);
-		regulator_enable(led->dcdc);
+		ret = regulator_enable(led->dcdc);
+		if (ret != 0)
+			dev_err(led->cdev.dev, "Failed to reenable DCDC: %d\n",
+				ret);
 		return;
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-06 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-02  7:40 [PATCH] leds: wm8350: Complain if we fail to reenable DCDC Mark Brown
2013-03-05 19:03 ` Bryan Wu
2013-03-06  4:55   ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2013-03-06  5:01 Mark Brown
2013-03-06 17:50 ` Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox