linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices
@ 2019-02-13 12:56 Baolin Wang
  2019-02-13 14:28 ` Arnd Bergmann
  2019-02-25  2:22 ` Baolin Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Baolin Wang @ 2019-02-13 12:56 UTC (permalink / raw)
  To: lee.jones; +Cc: arnd, broonie, orsonzhai, baolin.wang, zhang.lyra, linux-kernel

We should use SoC compatible string in stead of wildcard string for
PMIC child devices.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 drivers/mfd/sprd-sc27xx-spi.c |   42 ++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index 69df277..43ac716 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -53,67 +53,67 @@ struct sprd_pmic_data {
 static const struct mfd_cell sprd_pmic_devs[] = {
 	{
 		.name = "sc27xx-wdt",
-		.of_compatible = "sprd,sc27xx-wdt",
+		.of_compatible = "sprd,sc2731-wdt",
 	}, {
 		.name = "sc27xx-rtc",
-		.of_compatible = "sprd,sc27xx-rtc",
+		.of_compatible = "sprd,sc2731-rtc",
 	}, {
 		.name = "sc27xx-charger",
-		.of_compatible = "sprd,sc27xx-charger",
+		.of_compatible = "sprd,sc2731-charger",
 	}, {
 		.name = "sc27xx-chg-timer",
-		.of_compatible = "sprd,sc27xx-chg-timer",
+		.of_compatible = "sprd,sc2731-chg-timer",
 	}, {
 		.name = "sc27xx-fast-chg",
-		.of_compatible = "sprd,sc27xx-fast-chg",
+		.of_compatible = "sprd,sc2731-fast-chg",
 	}, {
 		.name = "sc27xx-chg-wdt",
-		.of_compatible = "sprd,sc27xx-chg-wdt",
+		.of_compatible = "sprd,sc2731-chg-wdt",
 	}, {
 		.name = "sc27xx-typec",
-		.of_compatible = "sprd,sc27xx-typec",
+		.of_compatible = "sprd,sc2731-typec",
 	}, {
 		.name = "sc27xx-flash",
-		.of_compatible = "sprd,sc27xx-flash",
+		.of_compatible = "sprd,sc2731-flash",
 	}, {
 		.name = "sc27xx-eic",
-		.of_compatible = "sprd,sc27xx-eic",
+		.of_compatible = "sprd,sc2731-eic",
 	}, {
 		.name = "sc27xx-efuse",
-		.of_compatible = "sprd,sc27xx-efuse",
+		.of_compatible = "sprd,sc2731-efuse",
 	}, {
 		.name = "sc27xx-thermal",
-		.of_compatible = "sprd,sc27xx-thermal",
+		.of_compatible = "sprd,sc2731-thermal",
 	}, {
 		.name = "sc27xx-adc",
-		.of_compatible = "sprd,sc27xx-adc",
+		.of_compatible = "sprd,sc2731-adc",
 	}, {
 		.name = "sc27xx-audio-codec",
-		.of_compatible = "sprd,sc27xx-audio-codec",
+		.of_compatible = "sprd,sc2731-audio-codec",
 	}, {
 		.name = "sc27xx-regulator",
-		.of_compatible = "sprd,sc27xx-regulator",
+		.of_compatible = "sprd,sc2731-regulator",
 	}, {
 		.name = "sc27xx-vibrator",
-		.of_compatible = "sprd,sc27xx-vibrator",
+		.of_compatible = "sprd,sc2731-vibrator",
 	}, {
 		.name = "sc27xx-keypad-led",
-		.of_compatible = "sprd,sc27xx-keypad-led",
+		.of_compatible = "sprd,sc2731-keypad-led",
 	}, {
 		.name = "sc27xx-bltc",
-		.of_compatible = "sprd,sc27xx-bltc",
+		.of_compatible = "sprd,sc2731-bltc",
 	}, {
 		.name = "sc27xx-fgu",
-		.of_compatible = "sprd,sc27xx-fgu",
+		.of_compatible = "sprd,sc2731-fgu",
 	}, {
 		.name = "sc27xx-7sreset",
-		.of_compatible = "sprd,sc27xx-7sreset",
+		.of_compatible = "sprd,sc2731-7sreset",
 	}, {
 		.name = "sc27xx-poweroff",
-		.of_compatible = "sprd,sc27xx-poweroff",
+		.of_compatible = "sprd,sc2731-poweroff",
 	}, {
 		.name = "sc27xx-syscon",
-		.of_compatible = "sprd,sc27xx-syscon",
+		.of_compatible = "sprd,sc2731-syscon",
 	},
 };
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices
  2019-02-13 12:56 [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices Baolin Wang
@ 2019-02-13 14:28 ` Arnd Bergmann
  2019-02-14  2:00   ` Baolin Wang
  2019-02-25  2:22 ` Baolin Wang
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2019-02-13 14:28 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Lee Jones, Mark Brown, Orson Zhai, Lyra Zhang, Linux Kernel Mailing List

On Wed, Feb 13, 2019 at 1:57 PM Baolin Wang <baolin.wang@linaro.org> wrote:
>
> We should use SoC compatible string in stead of wildcard string for
> PMIC child devices.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

Looks good. I had a look at arch/arm64/boot/dts/sprd/sc2731.dtsi
as well, which contains lines such as

compatible = "sprd,sc27xx-efuse", "sprd,sc2731-efuse";

which fortunately work with both variants of the driver.
Just to make sure we have the same understanding though:

- Other drivers will leave out the 27xx part and just do
  compatible = sprd,sc2732-efuse", "sprd,sc2731-efuse";

- When you specific a generic name (such as the sc2731 part),
  the more specific one (e.g. sc2732) needs to come /first/.
  The current DT appears to have those mixed up.

      Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices
  2019-02-13 14:28 ` Arnd Bergmann
@ 2019-02-14  2:00   ` Baolin Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Baolin Wang @ 2019-02-14  2:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lee Jones, Mark Brown, Orson Zhai, Lyra Zhang, Linux Kernel Mailing List

On Wed, 13 Feb 2019 at 22:28, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Wed, Feb 13, 2019 at 1:57 PM Baolin Wang <baolin.wang@linaro.org> wrote:
> >
> > We should use SoC compatible string in stead of wildcard string for
> > PMIC child devices.
> >
> > Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
>
> Looks good. I had a look at arch/arm64/boot/dts/sprd/sc2731.dtsi
> as well, which contains lines such as
>
> compatible = "sprd,sc27xx-efuse", "sprd,sc2731-efuse";
>
> which fortunately work with both variants of the driver.
> Just to make sure we have the same understanding though:
>
> - Other drivers will leave out the 27xx part and just do
>   compatible = sprd,sc2732-efuse", "sprd,sc2731-efuse";
>
> - When you specific a generic name (such as the sc2731 part),
>   the more specific one (e.g. sc2732) needs to come /first/.
>   The current DT appears to have those mixed up.

Yes, that's the conclusion we made. And I've send patches to remove
the 27xx part in drivers. Thanks for your help.

-- 
Baolin Wang
Best Regards

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices
  2019-02-13 12:56 [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices Baolin Wang
  2019-02-13 14:28 ` Arnd Bergmann
@ 2019-02-25  2:22 ` Baolin Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Baolin Wang @ 2019-02-25  2:22 UTC (permalink / raw)
  To: Lee Jones; +Cc: Arnd Bergmann, Mark Brown, Orson Zhai, Chunyan Zhang, LKML

Hi Lee,

On Wed, 13 Feb 2019 at 20:57, Baolin Wang <baolin.wang@linaro.org> wrote:
>
> We should use SoC compatible string in stead of wildcard string for
> PMIC child devices.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---

Could you apply this patch if you have no other issues? Thanks.

>  drivers/mfd/sprd-sc27xx-spi.c |   42 ++++++++++++++++++++---------------------
>  1 file changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
> index 69df277..43ac716 100644
> --- a/drivers/mfd/sprd-sc27xx-spi.c
> +++ b/drivers/mfd/sprd-sc27xx-spi.c
> @@ -53,67 +53,67 @@ struct sprd_pmic_data {
>  static const struct mfd_cell sprd_pmic_devs[] = {
>         {
>                 .name = "sc27xx-wdt",
> -               .of_compatible = "sprd,sc27xx-wdt",
> +               .of_compatible = "sprd,sc2731-wdt",
>         }, {
>                 .name = "sc27xx-rtc",
> -               .of_compatible = "sprd,sc27xx-rtc",
> +               .of_compatible = "sprd,sc2731-rtc",
>         }, {
>                 .name = "sc27xx-charger",
> -               .of_compatible = "sprd,sc27xx-charger",
> +               .of_compatible = "sprd,sc2731-charger",
>         }, {
>                 .name = "sc27xx-chg-timer",
> -               .of_compatible = "sprd,sc27xx-chg-timer",
> +               .of_compatible = "sprd,sc2731-chg-timer",
>         }, {
>                 .name = "sc27xx-fast-chg",
> -               .of_compatible = "sprd,sc27xx-fast-chg",
> +               .of_compatible = "sprd,sc2731-fast-chg",
>         }, {
>                 .name = "sc27xx-chg-wdt",
> -               .of_compatible = "sprd,sc27xx-chg-wdt",
> +               .of_compatible = "sprd,sc2731-chg-wdt",
>         }, {
>                 .name = "sc27xx-typec",
> -               .of_compatible = "sprd,sc27xx-typec",
> +               .of_compatible = "sprd,sc2731-typec",
>         }, {
>                 .name = "sc27xx-flash",
> -               .of_compatible = "sprd,sc27xx-flash",
> +               .of_compatible = "sprd,sc2731-flash",
>         }, {
>                 .name = "sc27xx-eic",
> -               .of_compatible = "sprd,sc27xx-eic",
> +               .of_compatible = "sprd,sc2731-eic",
>         }, {
>                 .name = "sc27xx-efuse",
> -               .of_compatible = "sprd,sc27xx-efuse",
> +               .of_compatible = "sprd,sc2731-efuse",
>         }, {
>                 .name = "sc27xx-thermal",
> -               .of_compatible = "sprd,sc27xx-thermal",
> +               .of_compatible = "sprd,sc2731-thermal",
>         }, {
>                 .name = "sc27xx-adc",
> -               .of_compatible = "sprd,sc27xx-adc",
> +               .of_compatible = "sprd,sc2731-adc",
>         }, {
>                 .name = "sc27xx-audio-codec",
> -               .of_compatible = "sprd,sc27xx-audio-codec",
> +               .of_compatible = "sprd,sc2731-audio-codec",
>         }, {
>                 .name = "sc27xx-regulator",
> -               .of_compatible = "sprd,sc27xx-regulator",
> +               .of_compatible = "sprd,sc2731-regulator",
>         }, {
>                 .name = "sc27xx-vibrator",
> -               .of_compatible = "sprd,sc27xx-vibrator",
> +               .of_compatible = "sprd,sc2731-vibrator",
>         }, {
>                 .name = "sc27xx-keypad-led",
> -               .of_compatible = "sprd,sc27xx-keypad-led",
> +               .of_compatible = "sprd,sc2731-keypad-led",
>         }, {
>                 .name = "sc27xx-bltc",
> -               .of_compatible = "sprd,sc27xx-bltc",
> +               .of_compatible = "sprd,sc2731-bltc",
>         }, {
>                 .name = "sc27xx-fgu",
> -               .of_compatible = "sprd,sc27xx-fgu",
> +               .of_compatible = "sprd,sc2731-fgu",
>         }, {
>                 .name = "sc27xx-7sreset",
> -               .of_compatible = "sprd,sc27xx-7sreset",
> +               .of_compatible = "sprd,sc2731-7sreset",
>         }, {
>                 .name = "sc27xx-poweroff",
> -               .of_compatible = "sprd,sc27xx-poweroff",
> +               .of_compatible = "sprd,sc2731-poweroff",
>         }, {
>                 .name = "sc27xx-syscon",
> -               .of_compatible = "sprd,sc27xx-syscon",
> +               .of_compatible = "sprd,sc2731-syscon",
>         },
>  };
>
> --
> 1.7.9.5
>


-- 
Baolin Wang
Best Regards

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-25  2:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 12:56 [PATCH] mfd: sc27xx: Use SoC compatible string for PMIC devices Baolin Wang
2019-02-13 14:28 ` Arnd Bergmann
2019-02-14  2:00   ` Baolin Wang
2019-02-25  2:22 ` Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).