Skip to contentSkip to conversation

mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l

PATCH In review Kiran Gunda 4 participants 11 messages Nov 5, 2019 – Jan 23, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mfd: qcom-spmi-pmic: Add support for pm6150 and pm6150l

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 2 ++
 drivers/mfd/qcom-spmi-pmic.c                             | 4 ++++
 2 files changed, 6 insertions(+)
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
index 1437062..b5fc64e 100644
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+		   "qcom,pm6150",
+		   "qcom,pm6150l",
                    or generalized "qcom,spmi-pmic".
 - reg:             Specifies the SPMI USID slave address for this device.
                    For more information see:
drivers/mfd/qcom-spmi-pmic.c +4 -0
index e8fe705..74b7980 100644
@@ -34,6 +34,8 @@
 #define PM8998_SUBTYPE		0x14
 #define PMI8998_SUBTYPE		0x15
 #define PM8005_SUBTYPE		0x18
+#define PM6150_SUBTYPE		0x28
+#define PM6150L_SUBTYPE		0x27
 
 static const struct of_device_id pmic_spmi_id_table[] = {
 	{ .compatible = "qcom,spmi-pmic", .data = (void *)COMMON_SUBTYPE },
@@ -53,6 +55,8 @@
 	{ .compatible = "qcom,pm8998",    .data = (void *)PM8998_SUBTYPE },
 	{ .compatible = "qcom,pmi8998",   .data = (void *)PMI8998_SUBTYPE },
 	{ .compatible = "qcom,pm8005",    .data = (void *)PM8005_SUBTYPE },
+	{ .compatible = "qcom,pm6150",    .data = (void *)PM6150_SUBTYPE },
+	{ .compatible = "qcom,pm6150l",   .data = (void *)PM6150L_SUBTYPE },
 	{ }
 };
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
 a Linux Foundation Collaborative Project
#1 lore raw

Quoting Kiran Gunda (2019-11-04 21:21:49)

Quoted 7 lines

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

I don't see anything sorted though.

Quoted 10 lines
 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 2 ++
 drivers/mfd/qcom-spmi-pmic.c                             | 4 ++++
 2 files changed, 6 insertions(+)
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +0 -0
index 1437062..b5fc64e 100644

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt Required properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+                  "qcom,pm6150",
+                  "qcom,pm6150l",

And this looks badly tabbed or something?

Quoted 25 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +0 -0
                    or generalized "qcom,spmi-pmic".
 - reg:             Specifies the SPMI USID slave address for this device.
                    For more information see:
drivers/mfd/qcom-spmi-pmic.c +4 -0
index e8fe705..74b7980 100644
@@ -34,6 +34,8 @@
 #define PM8998_SUBTYPE         0x14
 #define PMI8998_SUBTYPE                0x15
 #define PM8005_SUBTYPE         0x18
+#define PM6150_SUBTYPE         0x28
+#define PM6150L_SUBTYPE                0x27
 
 static const struct of_device_id pmic_spmi_id_table[] = {
        { .compatible = "qcom,spmi-pmic", .data = (void *)COMMON_SUBTYPE },
@@ -53,6 +55,8 @@
        { .compatible = "qcom,pm8998",    .data = (void *)PM8998_SUBTYPE },
        { .compatible = "qcom,pmi8998",   .data = (void *)PMI8998_SUBTYPE },
        { .compatible = "qcom,pm8005",    .data = (void *)PM8005_SUBTYPE },
+       { .compatible = "qcom,pm6150",    .data = (void *)PM6150_SUBTYPE },
+       { .compatible = "qcom,pm6150l",   .data = (void *)PM6150L_SUBTYPE },
        { }
 };
 
#2 lore raw
Quoted 11 lines · Stephen Boyd

Quoting Kiran Gunda (2019-11-04 21:21:49)

Quoted 7 lines

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

I don't see anything sorted though.

Sorry .. I might have misunderstood your comment. Let me know if my understanding is correct.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

And compatible here.

And on macro name here.

This means you want to sort all the existing compatible and macros in alpha numeric order ?

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Please sort on compatible string

This means you want sort in the order how the compatibles are defined ?

Quoted 5 lines
Quoted 5 lines
 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 2 ++
 drivers/mfd/qcom-spmi-pmic.c                             | 4 ++++
 2 files changed, 6 insertions(+)
Quoted 13 lines

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt Required properties: · line 36

Quoted 10 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
index 1437062..b5fc64e 100644
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+                  "qcom,pm6150",
+                  "qcom,pm6150l",

And this looks badly tabbed or something?

My bad, I used tabs. Will correct it in next post.

Quoted 32 lines
Quoted 32 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +0 -0
                    or generalized "qcom,spmi-pmic".
 - reg:             Specifies the SPMI USID slave address for this 

device.
For more information see:

drivers/mfd/qcom-spmi-pmic.c +2 -0
index e8fe705..74b7980 100644
@@ -34,6 +34,8 @@
 #define PM8998_SUBTYPE         0x14
 #define PMI8998_SUBTYPE                0x15
 #define PM8005_SUBTYPE         0x18
+#define PM6150_SUBTYPE         0x28
+#define PM6150L_SUBTYPE                0x27
 
 static const struct of_device_id pmic_spmi_id_table[] = {
        { .compatible = "qcom,spmi-pmic", .data = (void 

*)COMMON_SUBTYPE },

drivers/mfd/qcom-spmi-pmic.c +1 -0
@@ -53,6 +55,8 @@
        { .compatible = "qcom,pm8998",    .data = (void 
 *)PM8998_SUBTYPE },
        { .compatible = "qcom,pmi8998",   .data = (void 
 *)PMI8998_SUBTYPE },
        { .compatible = "qcom,pm8005",    .data = (void 
 *)PM8005_SUBTYPE },
+       { .compatible = "qcom,pm6150",    .data = (void 

*)PM6150_SUBTYPE },
+ { .compatible = "qcom,pm6150l", .data = (void
*)PM6150L_SUBTYPE },

        { }

};

#3 lore raw

Quoting [email protected] (2019-11-05 22:43:59)

Quoted 12 lines · Stephen Boyd
Quoted 11 lines

Quoting Kiran Gunda (2019-11-04 21:21:49)

Quoted 7 lines

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

I don't see anything sorted though.

Quoted 8 lines

Sorry .. I might have misunderstood your comment. Let me know if my understanding is correct.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

And compatible here.

And on macro name here.

This means you want to sort all the existing compatible and macros in alpha numeric order ?

Sorry I also got confused on what the driver is doing. I replied on the original patch with what is preferred.

#4 lore raw
Quoted 16 lines · Stephen Boyd

Quoting [email protected] (2019-11-05 22:43:59)

Quoted 15 lines · Stephen Boyd
Quoted 11 lines

Quoting Kiran Gunda (2019-11-04 21:21:49)

Quoted 7 lines

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

I don't see anything sorted though.

Sorry .. I might have misunderstood your comment. Let me know if my understanding is correct.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

And compatible here.

And on macro name here.

This means you want to sort all the existing compatible and macros in alpha numeric order ?

Sorry I also got confused on what the driver is doing. I replied on the original patch with what is preferred.

Ok.. I just replied to that.

#5 lore raw
In reply to Stephen Boyd

Hi Kiran,

What is the status of this patch? It has outstanding comments and I couldn't find a later version. Do you plan to post a v3 in the near future?

Thanks

Matthias

Quoted 25 lines · Stephen Boyd

Quoting [email protected] (2019-11-05 22:43:59)

Quoted 12 lines · Stephen Boyd
Quoted 11 lines

Quoting Kiran Gunda (2019-11-04 21:21:49)

Quoted 7 lines

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

I don't see anything sorted though.

Quoted 8 lines

Sorry .. I might have misunderstood your comment. Let me know if my understanding is correct.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

And compatible here.

And on macro name here.

This means you want to sort all the existing compatible and macros in alpha numeric order ?

Sorry I also got confused on what the driver is doing. I replied on the original patch with what is preferred.

#6 lore raw

Hi Matthias,
Sorry for the delay...

Yes. I submit the V3 shortly.

Just to note that this is a good to have patch and not critical.
We are using a "qcom,spmi-pmic" compatible in the device tree files, so using the pm6150/pm6150l is not a mandatory.

Thanks,
Kiran

Quoted 36 lines · Matthias Kaehlcke

Hi Kiran,

What is the status of this patch? It has outstanding comments and I couldn't find a later version. Do you plan to post a v3 in the near future?

Thanks

Matthias

Quoted 25 lines · Stephen Boyd

Quoting [email protected] (2019-11-05 22:43:59)

Quoted 12 lines · Stephen Boyd
Quoted 11 lines

Quoting Kiran Gunda (2019-11-04 21:21:49)

Quoted 7 lines

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

I don't see anything sorted though.

Quoted 8 lines

Sorry .. I might have misunderstood your comment. Let me know if my understanding is correct.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

And compatible here.

And on macro name here.

This means you want to sort all the existing compatible and macros in alpha numeric order ?

Sorry I also got confused on what the driver is doing. I replied on the original patch with what is preferred.

#7 lore raw
In reply to Kiran Gunda

Quoting Kiran Gunda (2019-11-04 21:21:49)

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt Required properties: · line 36

Quoted 10 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
index 1437062..b5fc64e 100644
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+                  "qcom,pm6150",
+                  "qcom,pm6150l",

This seems to match the compatible list in the driver. Can you convert this binding to YAML and then sort this compatible string list alpha-numberically? Two patches, one to convert to YAML and sort and another patch to add these new compatible strings.

drivers/mfd/qcom-spmi-pmic.c line 38

Quoted 13 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +0 -0
                    or generalized "qcom,spmi-pmic".
 - reg:             Specifies the SPMI USID slave address for this device.
                    For more information see:
drivers/mfd/qcom-spmi-pmic.c +2 -0
index e8fe705..74b7980 100644
@@ -34,6 +34,8 @@
 #define PM8998_SUBTYPE         0x14
 #define PMI8998_SUBTYPE                0x15
 #define PM8005_SUBTYPE         0x18
+#define PM6150_SUBTYPE         0x28
+#define PM6150L_SUBTYPE                0x27

This list looks to be sorted based on id number, so just swap the two here.

drivers/mfd/qcom-spmi-pmic.c line 59

Quoted 9 lines
drivers/mfd/qcom-spmi-pmic.c +2 -0
 static const struct of_device_id pmic_spmi_id_table[] = {
        { .compatible = "qcom,spmi-pmic", .data = (void *)COMMON_SUBTYPE },
@@ -53,6 +55,8 @@
        { .compatible = "qcom,pm8998",    .data = (void *)PM8998_SUBTYPE },
        { .compatible = "qcom,pmi8998",   .data = (void *)PMI8998_SUBTYPE },
        { .compatible = "qcom,pm8005",    .data = (void *)PM8005_SUBTYPE },
+       { .compatible = "qcom,pm6150",    .data = (void *)PM6150_SUBTYPE },
+       { .compatible = "qcom,pm6150l",   .data = (void *)PM6150L_SUBTYPE },

This is also sorted based on .data value, so swap the two here too.

Quoted 1 line
drivers/mfd/qcom-spmi-pmic.c +0 -0
        { }
#8 lore raw
Quoted 17 lines · Stephen Boyd

Quoting Kiran Gunda (2019-11-04 21:21:49)

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt Required properties: · line 36

Quoted 10 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
index 1437062..b5fc64e 100644
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+                  "qcom,pm6150",
+                  "qcom,pm6150l",

This seems to match the compatible list in the driver. Can you convert this binding to YAML and then sort this compatible string list alpha-numberically? Two patches, one to convert to YAML and sort and another patch to add these new compatible strings.

Sure. Will do it.

Quoted 9 lines
Quoted 9 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +0 -0
                    or generalized "qcom,spmi-pmic".
 - reg:             Specifies the SPMI USID slave address for this 

device.
For more information see:

drivers/mfd/qcom-spmi-pmic.c +0 -0
index e8fe705..74b7980 100644
@@ -34,6 +34,8 @@
Quoted 9 lines

drivers/mfd/qcom-spmi-pmic.c line 38

Quoted 5 lines
drivers/mfd/qcom-spmi-pmic.c +2 -0
 #define PM8998_SUBTYPE         0x14
 #define PMI8998_SUBTYPE                0x15
 #define PM8005_SUBTYPE         0x18
+#define PM6150_SUBTYPE         0x28
+#define PM6150L_SUBTYPE                0x27

This list looks to be sorted based on id number, so just swap the two here.

Ok. Will do it in next post.

Quoted 18 lines
Quoted 12 lines
drivers/mfd/qcom-spmi-pmic.c +1 -0
 static const struct of_device_id pmic_spmi_id_table[] = {
        { .compatible = "qcom,spmi-pmic", .data = (void 
 *)COMMON_SUBTYPE },
@@ -53,6 +55,8 @@
        { .compatible = "qcom,pm8998",    .data = (void 
 *)PM8998_SUBTYPE },
        { .compatible = "qcom,pmi8998",   .data = (void 
 *)PMI8998_SUBTYPE },
        { .compatible = "qcom,pm8005",    .data = (void 
 *)PM8005_SUBTYPE },
+       { .compatible = "qcom,pm6150",    .data = (void 
Quoted 3 lines

*)PM6150_SUBTYPE },
+ { .compatible = "qcom,pm6150l", .data = (void
*)PM6150L_SUBTYPE },

This is also sorted based on .data value, so swap the two here too.

Ok. Will do it in next post.

Quoted 1 line
Quoted 1 line
        { }
#9 lore raw
In reply to Kiran Gunda
Quoted 17 lines · Kiran Gunda

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 2 ++
 drivers/mfd/qcom-spmi-pmic.c                             | 4 ++++
 2 files changed, 6 insertions(+)
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +0 -0
index 1437062..b5fc64e 100644

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt Required properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+		   "qcom,pm6150",
+		   "qcom,pm6150l",

Tabbing looks off.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw
Quoted 14 lines · Lee Jones
Quoted 12 lines · Kiran Gunda

Add the compatibles and PMIC ids for pm6150 and pm6150l PMICs found on SC7180 based platforms.

---
- Changes from V1:
Sorted the macros and compatibles.

 Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 2 ++
 drivers/mfd/qcom-spmi-pmic.c                             | 4 ++++
 2 files changed, 6 insertions(+)
Quoted 12 lines

Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt Required properties: · line 36

Quoted 10 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +2 -0
index 1437062..b5fc64e 100644
@@ -32,6 +32,8 @@ Required properties:
                    "qcom,pm8998",
                    "qcom,pmi8998",
                    "qcom,pm8005",
+		   "qcom,pm6150",
+		   "qcom,pm6150l",

Tabbing looks off.

yes. Placed a tab mistakenly. Going to address in next post.