提交 1beaf762 编写于 作者: K Krystian Garbaciak 提交者: Mark Brown

regulator: Add REGULATOR_STATUS_UNDEFINED.

REGULATOR_STATUS_UNDEFINED is to be returned by regulator, if any other state
doesn't really apply.
Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 03ffcf3d
...@@ -393,6 +393,9 @@ static ssize_t regulator_status_show(struct device *dev, ...@@ -393,6 +393,9 @@ static ssize_t regulator_status_show(struct device *dev,
case REGULATOR_STATUS_STANDBY: case REGULATOR_STATUS_STANDBY:
label = "standby"; label = "standby";
break; break;
case REGULATOR_STATUS_UNDEFINED:
label = "undefined";
break;
default: default:
return -ERANGE; return -ERANGE;
} }
...@@ -2897,7 +2900,7 @@ int regulator_mode_to_status(unsigned int mode) ...@@ -2897,7 +2900,7 @@ int regulator_mode_to_status(unsigned int mode)
case REGULATOR_MODE_STANDBY: case REGULATOR_MODE_STANDBY:
return REGULATOR_STATUS_STANDBY; return REGULATOR_STATUS_STANDBY;
default: default:
return 0; return REGULATOR_STATUS_UNDEFINED;
} }
} }
EXPORT_SYMBOL_GPL(regulator_mode_to_status); EXPORT_SYMBOL_GPL(regulator_mode_to_status);
......
...@@ -32,6 +32,8 @@ enum regulator_status { ...@@ -32,6 +32,8 @@ enum regulator_status {
REGULATOR_STATUS_NORMAL, REGULATOR_STATUS_NORMAL,
REGULATOR_STATUS_IDLE, REGULATOR_STATUS_IDLE,
REGULATOR_STATUS_STANDBY, REGULATOR_STATUS_STANDBY,
/* in case that any other status doesn't apply */
REGULATOR_STATUS_UNDEFINED,
}; };
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册