提交 0505be71 编写于 作者: J Javier Martinez Canillas 提交者: Mark Brown

regulator: max77802: Don't treat OFF as an operating mode

The only operating modes that are supported by the regulators in the
max77802 PMIC are Output ON (normal) and Output On in Low Power Mode.
OFF was wrongly counted as an operating mode while is only a regulator
status. Make clear in the code that OFF is not an operating mode.
Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 2e0eaa1a
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#define MAX77802_RAMP_RATE_MASK_4BIT 0xF0 #define MAX77802_RAMP_RATE_MASK_4BIT 0xF0
#define MAX77802_RAMP_RATE_SHIFT_4BIT 4 #define MAX77802_RAMP_RATE_SHIFT_4BIT 4
#define MAX77802_STATUS_OFF 0x0
#define MAX77802_OFF_PWRREQ 0x1 #define MAX77802_OFF_PWRREQ 0x1
#define MAX77802_LP_PWRREQ 0x2 #define MAX77802_LP_PWRREQ 0x2
...@@ -615,7 +616,7 @@ static int max77802_pmic_probe(struct platform_device *pdev) ...@@ -615,7 +616,7 @@ static int max77802_pmic_probe(struct platform_device *pdev)
* the hardware reports OFF as the regulator operating mode. * the hardware reports OFF as the regulator operating mode.
* Default to operating mode NORMAL in that case. * Default to operating mode NORMAL in that case.
*/ */
if (val == MAX77802_OPMODE_OFF) if (val == MAX77802_STATUS_OFF)
max77802->opmode[id] = MAX77802_OPMODE_NORMAL; max77802->opmode[id] = MAX77802_OPMODE_NORMAL;
else else
max77802->opmode[id] = val; max77802->opmode[id] = val;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册