Commit efc9b204 authored by Dave Gerlach's avatar Dave Gerlach Committed by Lee Jones

mfd: tps65218: Reorder tps65218_regulator_id enum

Commit 2dc49403 ("regulator: tps65218: Remove all the compatibles")
changes the probe function of drivers/regulator/tps65218-regulator.c so
that it iterates through all available regulators and assumes that the
regulator IDs are sequential and match the order present in the enum
tps65218_regulator_id. However, for some reason the much older commit
c0ea88b8 ("regulator: tps65218: add support for LS3 current
regulator") updated all arrays with LS3 at the end but added it second
to last for the enum.

Because of this long standing mismatch in order between the
tps65218_regulator_id enum and the regulator_desc array in the tps65218
regulator driver, the new probe function causes the strobe values to be
associated with the wrong regulator ID. This causes LDO1 to fail to
suspend in tps65218_pmic_set_suspend_disable due to not having anything
probes for its strobe value. Fix the order in the enum so the probe
function works as the update intended.

Fixes: 2dc49403 ("regulator: tps65218: Remove all the compatibles")
Signed-off-by: default avatarDave Gerlach <d-gerlach@ti.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 408d1d57
......@@ -205,10 +205,10 @@ enum tps65218_regulator_id {
TPS65218_DCDC_4,
TPS65218_DCDC_5,
TPS65218_DCDC_6,
/* LS's */
TPS65218_LS_3,
/* LDOs */
TPS65218_LDO_1,
/* LS's */
TPS65218_LS_3,
};
#define TPS65218_MAX_REG_ID TPS65218_LDO_1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment