aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-01-04 10:30:54 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-02-01 08:52:44 -0500
commita2fad9bf26a1d44a8d31a5c4528108a2b9f468ab (patch)
treecc9bfa3cae59bc03bc4d9a448c32402403485516
parentabe94c756c08d50566c09a65b9c7fe72f83071c5 (diff)
regulator: Specify REGULATOR_CHANGE_STATUS for WM835x LED constraints
The WM8350 LED driver needs to be able to enable and disable the regulators it is using. Previously the core wasn't properly enforcing status change constraints so the driver was able to function but this has always been intended to be required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r--drivers/regulator/wm8350-regulator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 1bbff099a546..e7b89e704af6 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1504,7 +1504,8 @@ int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink,
1504 led->isink_init.consumer_supplies = &led->isink_consumer; 1504 led->isink_init.consumer_supplies = &led->isink_consumer;
1505 led->isink_init.constraints.min_uA = 0; 1505 led->isink_init.constraints.min_uA = 0;
1506 led->isink_init.constraints.max_uA = pdata->max_uA; 1506 led->isink_init.constraints.max_uA = pdata->max_uA;
1507 led->isink_init.constraints.valid_ops_mask = REGULATOR_CHANGE_CURRENT; 1507 led->isink_init.constraints.valid_ops_mask
1508 = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS;
1508 led->isink_init.constraints.valid_modes_mask = REGULATOR_MODE_NORMAL; 1509 led->isink_init.constraints.valid_modes_mask = REGULATOR_MODE_NORMAL;
1509 ret = wm8350_register_regulator(wm8350, isink, &led->isink_init); 1510 ret = wm8350_register_regulator(wm8350, isink, &led->isink_init);
1510 if (ret != 0) { 1511 if (ret != 0) {
@@ -1517,6 +1518,7 @@ int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink,
1517 led->dcdc_init.num_consumer_supplies = 1; 1518 led->dcdc_init.num_consumer_supplies = 1;
1518 led->dcdc_init.consumer_supplies = &led->dcdc_consumer; 1519 led->dcdc_init.consumer_supplies = &led->dcdc_consumer;
1519 led->dcdc_init.constraints.valid_modes_mask = REGULATOR_MODE_NORMAL; 1520 led->dcdc_init.constraints.valid_modes_mask = REGULATOR_MODE_NORMAL;
1521 led->dcdc_init.constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS;
1520 ret = wm8350_register_regulator(wm8350, dcdc, &led->dcdc_init); 1522 ret = wm8350_register_regulator(wm8350, dcdc, &led->dcdc_init);
1521 if (ret != 0) { 1523 if (ret != 0) {
1522 platform_device_put(pdev); 1524 platform_device_put(pdev);