aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/core.c5
-rw-r--r--include/linux/regulator/driver.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 4b136f8cb99f..01a67c50c4ea 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -393,6 +393,9 @@ static ssize_t regulator_status_show(struct device *dev,
393 case REGULATOR_STATUS_STANDBY: 393 case REGULATOR_STATUS_STANDBY:
394 label = "standby"; 394 label = "standby";
395 break; 395 break;
396 case REGULATOR_STATUS_UNDEFINED:
397 label = "undefined";
398 break;
396 default: 399 default:
397 return -ERANGE; 400 return -ERANGE;
398 } 401 }
@@ -2897,7 +2900,7 @@ int regulator_mode_to_status(unsigned int mode)
2897 case REGULATOR_MODE_STANDBY: 2900 case REGULATOR_MODE_STANDBY:
2898 return REGULATOR_STATUS_STANDBY; 2901 return REGULATOR_STATUS_STANDBY;
2899 default: 2902 default:
2900 return 0; 2903 return REGULATOR_STATUS_UNDEFINED;
2901 } 2904 }
2902} 2905}
2903EXPORT_SYMBOL_GPL(regulator_mode_to_status); 2906EXPORT_SYMBOL_GPL(regulator_mode_to_status);
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 80226383e561..2513a54ca2e8 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -32,6 +32,8 @@ enum regulator_status {
32 REGULATOR_STATUS_NORMAL, 32 REGULATOR_STATUS_NORMAL,
33 REGULATOR_STATUS_IDLE, 33 REGULATOR_STATUS_IDLE,
34 REGULATOR_STATUS_STANDBY, 34 REGULATOR_STATUS_STANDBY,
35 /* in case that any other status doesn't apply */
36 REGULATOR_STATUS_UNDEFINED,
35}; 37};
36 38
37/** 39/**