* [PATCH] regulator: da9063: fix DT probing with constraints
@ 2018-08-31 12:34 Philipp Zabel
2018-08-31 12:37 ` Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Philipp Zabel @ 2018-08-31 12:34 UTC (permalink / raw)
To: Lee Jones
Cc: linux-kernel, kernel, Marek Vasut, Mark Brown, Geert Uytterhoeven
Commit 1c892e38ce59 ("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: 1c892e38ce59 ("regulator: da9063: Handle less LDOs on DA9063L")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Lee Jones <lee.jones@linaro.org>
---
include/linux/mfd/da9063/pdata.h | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/include/linux/mfd/da9063/pdata.h b/include/linux/mfd/da9063/pdata.h
index 8a125701ef7b..50bed4f89c1a 100644
--- a/include/linux/mfd/da9063/pdata.h
+++ b/include/linux/mfd/da9063/pdata.h
@@ -21,7 +21,7 @@
/*
* Regulator configuration
*/
-/* DA9063 regulator IDs */
+/* DA9063 and DA9063L regulator IDs */
enum {
/* BUCKs */
DA9063_ID_BCORE1,
@@ -37,18 +37,20 @@ enum {
DA9063_ID_BMEM_BIO_MERGED,
/* When two BUCKs are merged, they cannot be reused separately */
- /* LDOs */
+ /* LDOs on both DA9063 and DA9063L */
+ DA9063_ID_LDO3,
+ DA9063_ID_LDO7,
+ DA9063_ID_LDO8,
+ DA9063_ID_LDO9,
+ DA9063_ID_LDO11,
+
+ /* DA9063-only LDOs */
DA9063_ID_LDO1,
DA9063_ID_LDO2,
- DA9063_ID_LDO3,
DA9063_ID_LDO4,
DA9063_ID_LDO5,
DA9063_ID_LDO6,
- DA9063_ID_LDO7,
- DA9063_ID_LDO8,
- DA9063_ID_LDO9,
DA9063_ID_LDO10,
- DA9063_ID_LDO11,
};
/* Regulators platform data */
--
2.18.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: da9063: fix DT probing with constraints
2018-08-31 12:34 [PATCH] regulator: da9063: fix DT probing with constraints Philipp Zabel
@ 2018-08-31 12:37 ` Geert Uytterhoeven
2018-08-31 13:09 ` Marek Vasut
2018-09-10 15:56 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-08-31 12:37 UTC (permalink / raw)
To: Philipp Zabel
Cc: Lee Jones, Linux Kernel Mailing List, Sascha Hauer, Marek Vasut,
Mark Brown, Geert Uytterhoeven
Hi Philipp,
On Fri, Aug 31, 2018 at 2:34 PM Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Commit 1c892e38ce59 ("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)
My apologies for failing to notice that.
> This patch reorders the DA9063_ID_* as apparently intended, and with
> them the entries in the da90630_matches[] array.
>
> Fixes: 1c892e38ce59 ("regulator: da9063: Handle less LDOs on DA9063L")
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: da9063: fix DT probing with constraints
2018-08-31 12:34 [PATCH] regulator: da9063: fix DT probing with constraints Philipp Zabel
2018-08-31 12:37 ` Geert Uytterhoeven
@ 2018-08-31 13:09 ` Marek Vasut
2018-09-10 15:56 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2018-08-31 13:09 UTC (permalink / raw)
To: Philipp Zabel, Lee Jones
Cc: linux-kernel, kernel, Marek Vasut, Mark Brown, Geert Uytterhoeven
On 08/31/2018 02:34 PM, Philipp Zabel wrote:
> Commit 1c892e38ce59 ("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: 1c892e38ce59 ("regulator: da9063: Handle less LDOs on DA9063L")
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Lee Jones <lee.jones@linaro.org>
Thanks
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> include/linux/mfd/da9063/pdata.h | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/mfd/da9063/pdata.h b/include/linux/mfd/da9063/pdata.h
> index 8a125701ef7b..50bed4f89c1a 100644
> --- a/include/linux/mfd/da9063/pdata.h
> +++ b/include/linux/mfd/da9063/pdata.h
> @@ -21,7 +21,7 @@
> /*
> * Regulator configuration
> */
> -/* DA9063 regulator IDs */
> +/* DA9063 and DA9063L regulator IDs */
> enum {
> /* BUCKs */
> DA9063_ID_BCORE1,
> @@ -37,18 +37,20 @@ enum {
> DA9063_ID_BMEM_BIO_MERGED,
> /* When two BUCKs are merged, they cannot be reused separately */
>
> - /* LDOs */
> + /* LDOs on both DA9063 and DA9063L */
> + DA9063_ID_LDO3,
> + DA9063_ID_LDO7,
> + DA9063_ID_LDO8,
> + DA9063_ID_LDO9,
> + DA9063_ID_LDO11,
> +
> + /* DA9063-only LDOs */
> DA9063_ID_LDO1,
> DA9063_ID_LDO2,
> - DA9063_ID_LDO3,
> DA9063_ID_LDO4,
> DA9063_ID_LDO5,
> DA9063_ID_LDO6,
> - DA9063_ID_LDO7,
> - DA9063_ID_LDO8,
> - DA9063_ID_LDO9,
> DA9063_ID_LDO10,
> - DA9063_ID_LDO11,
> };
>
> /* Regulators platform data */
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: da9063: fix DT probing with constraints
2018-08-31 12:34 [PATCH] regulator: da9063: fix DT probing with constraints Philipp Zabel
2018-08-31 12:37 ` Geert Uytterhoeven
2018-08-31 13:09 ` Marek Vasut
@ 2018-09-10 15:56 ` Lee Jones
2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2018-09-10 15:56 UTC (permalink / raw)
To: Philipp Zabel
Cc: linux-kernel, kernel, Marek Vasut, Mark Brown, Geert Uytterhoeven
On Fri, 31 Aug 2018, Philipp Zabel wrote:
> Commit 1c892e38ce59 ("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: 1c892e38ce59 ("regulator: da9063: Handle less LDOs on DA9063L")
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Lee Jones <lee.jones@linaro.org>
> ---
> include/linux/mfd/da9063/pdata.h | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
This is an MFD patch.
I'll make the necessary changes and apply it.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-10 15:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 12:34 [PATCH] regulator: da9063: fix DT probing with constraints Philipp Zabel
2018-08-31 12:37 ` Geert Uytterhoeven
2018-08-31 13:09 ` Marek Vasut
2018-09-10 15:56 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.