Skip to content

Commit ef394f3

Browse files
pH5broonie
authored andcommitted
regulator: da9063: fix DT probing with constraints
Commit 1c892e3 ("regulator: da9063: Handle less LDOs on DA9063L") reordered the da9063_regulator_info[] array, but not the DA9063_ID_* regulator ids and not the da9063_matches[] array, because ids are used as indices in the array initializer. This mismatch between regulator id and da9063_regulator_info[] array index causes the driver probe to fail because constraints from DT are not applied to the correct regulator: da9063 0-0058: Device detected (chip-ID: 0x61, var-ID: 0x50) DA9063_BMEM: Bringing 900000uV into 3300000-3300000uV DA9063_LDO9: Bringing 3300000uV into 2500000-2500000uV DA9063_LDO1: Bringing 900000uV into 3300000-3300000uV DA9063_LDO1: failed to apply 3300000-3300000uV constraint(-22) This patch reorders the DA9063_ID_* as apparently intended, and with them the entries in the da90630_matches[] array. Fixes: 1c892e3 ("regulator: da9063: Handle less LDOs on DA9063L") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 823f18f commit ef394f3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

include/linux/mfd/da9063/pdata.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/*
2222
* Regulator configuration
2323
*/
24-
/* DA9063 regulator IDs */
24+
/* DA9063 and DA9063L regulator IDs */
2525
enum {
2626
/* BUCKs */
2727
DA9063_ID_BCORE1,
@@ -37,18 +37,20 @@ enum {
3737
DA9063_ID_BMEM_BIO_MERGED,
3838
/* When two BUCKs are merged, they cannot be reused separately */
3939

40-
/* LDOs */
40+
/* LDOs on both DA9063 and DA9063L */
41+
DA9063_ID_LDO3,
42+
DA9063_ID_LDO7,
43+
DA9063_ID_LDO8,
44+
DA9063_ID_LDO9,
45+
DA9063_ID_LDO11,
46+
47+
/* DA9063-only LDOs */
4148
DA9063_ID_LDO1,
4249
DA9063_ID_LDO2,
43-
DA9063_ID_LDO3,
4450
DA9063_ID_LDO4,
4551
DA9063_ID_LDO5,
4652
DA9063_ID_LDO6,
47-
DA9063_ID_LDO7,
48-
DA9063_ID_LDO8,
49-
DA9063_ID_LDO9,
5053
DA9063_ID_LDO10,
51-
DA9063_ID_LDO11,
5254
};
5355

5456
/* Regulators platform data */

0 commit comments

Comments
 (0)