linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] soc: qcom: socinfo: import PMIC IDs from pmic-spmi
@ 2021-05-04 20:37 Luca Weiss
  2021-05-05 19:14 ` Konrad Dybcio
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Weiss @ 2021-05-04 20:37 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, Luca Weiss, Andy Gross,
	Bjorn Andersson, linux-kernel

The driver in drivers/mfd/qcom-spmi-pmic.c has a more complete and more
up-to-date list of PMICs with the respective IDs. Use those names for
socinfo.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
I'm sending this as RFC because I'm not sure what names are correct for
the IDs that I've replaced (13, 16, 17, 20, 21, 24).
For PM8941, PM8841, PM8226 and PMA8084 I'm quite sure that the IDs are
correct, but I don't have devices with the other PMICs. Please advise
what to do.

 drivers/soc/qcom/socinfo.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 63f14a2a4ef2..a802f330dbd4 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -70,21 +70,33 @@ static const char *const socinfo_image_names[] = {
 
 static const char *const pmic_models[] = {
 	[0]  = "Unknown PMIC model",
+	[1]  = "PM8941",
+	[2]  = "PM8841",
+	[3]  = "PM8019",
+	[4]  = "PM8226",
+	[5]  = "PM8110",
+	[6]  = "PMA8084",
+	[7]  = "PMI8962",
+	[8]  = "PMD9635",
 	[9]  = "PM8994",
+	[10] = "PMI8994",
 	[11] = "PM8916",
-	[13] = "PM8058",
+	[12] = "PM8004",
+	[13] = "PM8909",
 	[14] = "PM8028",
 	[15] = "PM8901",
-	[16] = "PM8027",
-	[17] = "ISL9519",
+	[16] = "PM8950",
+	[17] = "PMI8950",
 	[18] = "PM8921",
 	[19] = "PM8018",
-	[20] = "PM8015",
-	[21] = "PM8014",
+	[20] = "PM8998",
+	[21] = "PMI8998",
 	[22] = "PM8821",
 	[23] = "PM8038",
-	[24] = "PM8922",
+	[24] = "PM8005",
 	[25] = "PM8917",
+	[26] = "PM660L",
+	[27] = "PM660",
 	[30] = "PM8150",
 	[31] = "PM8150L",
 	[32] = "PM8150B",
-- 
2.31.1


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

* Re: [RFC PATCH] soc: qcom: socinfo: import PMIC IDs from pmic-spmi
  2021-05-04 20:37 [RFC PATCH] soc: qcom: socinfo: import PMIC IDs from pmic-spmi Luca Weiss
@ 2021-05-05 19:14 ` Konrad Dybcio
  2021-05-26  3:58   ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Dybcio @ 2021-05-05 19:14 UTC (permalink / raw)
  To: Luca Weiss, linux-arm-msm
  Cc: ~postmarketos/upstreaming, Andy Gross, Bjorn Andersson, linux-kernel

Hi,


> The driver in drivers/mfd/qcom-spmi-pmic.c has a more complete and more
> up-to-date list of PMICs with the respective IDs. Use those names for
> socinfo.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> I'm sending this as RFC because I'm not sure what names are correct for
> the IDs that I've replaced (13, 16, 17, 20, 21, 24).
> For PM8941, PM8841, PM8226 and PMA8084 I'm quite sure that the IDs are
> correct, but I don't have devices with the other PMICs. Please advise
> what to do.
>
As far as I'm aware, qcom did the lazy and ugly thing (as they usually do) and

decided to reuse previously-occupied IDs on newer kernel releases, where the legacy

PMICs weren't supported anymore. That's why some IDs have multiple candidates and unless

a better suggestion than "let's check if this 2013 PMIC+ 2019 SoC combo is sane" pops up, we

will probably just have to deal with ambiguity (for example `[20] PM8015/PM8998`).


Konrad


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

* Re: [RFC PATCH] soc: qcom: socinfo: import PMIC IDs from pmic-spmi
  2021-05-05 19:14 ` Konrad Dybcio
@ 2021-05-26  3:58   ` Bjorn Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2021-05-26  3:58 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Luca Weiss, linux-arm-msm, ~postmarketos/upstreaming, Andy Gross,
	linux-kernel

On Wed 05 May 14:14 CDT 2021, Konrad Dybcio wrote:

> Hi,
> 
> 
> > The driver in drivers/mfd/qcom-spmi-pmic.c has a more complete and more
> > up-to-date list of PMICs with the respective IDs. Use those names for
> > socinfo.
> >
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > I'm sending this as RFC because I'm not sure what names are correct for
> > the IDs that I've replaced (13, 16, 17, 20, 21, 24).
> > For PM8941, PM8841, PM8226 and PMA8084 I'm quite sure that the IDs are
> > correct, but I don't have devices with the other PMICs. Please advise
> > what to do.
> >
> As far as I'm aware, qcom did the lazy and ugly thing (as they usually do) and
> 
> decided to reuse previously-occupied IDs on newer kernel releases, where the legacy
> 
> PMICs weren't supported anymore. That's why some IDs have multiple candidates and unless
> 
> a better suggestion than "let's check if this 2013 PMIC+ 2019 SoC combo is sane" pops up, we
> 
> will probably just have to deal with ambiguity (for example `[20] PM8015/PM8998`).
> 

I like this suggestion, even though I think it's only PM8058 we at all
care about upstream (as of now).

Luca, can you please respin the patch accordingly?

Thanks,
Bjorn

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

end of thread, other threads:[~2021-05-26  3:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 20:37 [RFC PATCH] soc: qcom: socinfo: import PMIC IDs from pmic-spmi Luca Weiss
2021-05-05 19:14 ` Konrad Dybcio
2021-05-26  3:58   ` Bjorn Andersson

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).