Skip to contentSkip to conversation

mfd: pm8xxx: add support for PM8901

PATCH In review Herman van Hazendonk 3 participants 3 messages Apr 15, 2024 – Apr 17, 2024

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

PATCH 1/1 mfd: pm8xxx: add support for PM8901

Add support for the pm8901 PMIC used by msm8660.

---
 drivers/mfd/qcom-pm8xxx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/qcom-pm8xxx.c +1 -0
index 8b6285f687da..9cca14d54d8d 100644
@@ -501,6 +501,7 @@ static const struct pm_irq_data pm8821_data = {
 static const struct of_device_id pm8xxx_id_table[] = {
 	{ .compatible = "qcom,pm8058", .data = &pm8xxx_data},
 	{ .compatible = "qcom,pm8821", .data = &pm8821_data},
+	{ .compatible = "qcom,pm8901", .data = &pm8xxx_data},
 	{ .compatible = "qcom,pm8921", .data = &pm8xxx_data},
 	{ }
 };
#1 lore raw
Quoted 12 lines · Herman van Hazendonk

Add support for the pm8901 PMIC used by msm8660.

---
  drivers/mfd/qcom-pm8xxx.c | 1 +
  1 file changed, 1 insertion(+)
drivers/mfd/qcom-pm8xxx.c +0 -0
index 8b6285f687da..9cca14d54d8d 100644

drivers/mfd/qcom-pm8xxx.c static const struct pm_irq_data pm8821_data = { · line 505

Quoted 5 lines
drivers/mfd/qcom-pm8xxx.c +1 -0
@@ -501,6 +501,7 @@ static const struct pm_irq_data pm8821_data = {
  static const struct of_device_id pm8xxx_id_table[] = {
  	{ .compatible = "qcom,pm8058", .data = &pm8xxx_data},
  	{ .compatible = "qcom,pm8821", .data = &pm8821_data},
+	{ .compatible = "qcom,pm8901", .data = &pm8xxx_data},
  	{ .compatible = "qcom,pm8921", .data = &pm8xxx_data},

Please refrain from adding this new compatible, instead add a new, generic one and modify the dt-bindings such that we go like:

compatible = "qcom,pm8901", "qcom,pm8xxx-ssbi-pmic"

(or similar, +CC Krzysztof, please chime in)

Konrad

#2 lore raw
Quoted 25 lines · Konrad Dybcio
Quoted 12 lines · Herman van Hazendonk

Add support for the pm8901 PMIC used by msm8660.

---
  drivers/mfd/qcom-pm8xxx.c | 1 +
  1 file changed, 1 insertion(+)
drivers/mfd/qcom-pm8xxx.c +0 -0
index 8b6285f687da..9cca14d54d8d 100644

drivers/mfd/qcom-pm8xxx.c static const struct pm_irq_data pm8821_data = { · line 505

Quoted 5 lines
drivers/mfd/qcom-pm8xxx.c +1 -0
@@ -501,6 +501,7 @@ static const struct pm_irq_data pm8821_data = {
  static const struct of_device_id pm8xxx_id_table[] = {
      { .compatible = "qcom,pm8058", .data = &pm8xxx_data},
      { .compatible = "qcom,pm8821", .data = &pm8821_data},
+     { .compatible = "qcom,pm8901", .data = &pm8xxx_data},
      { .compatible = "qcom,pm8921", .data = &pm8xxx_data},

Please refrain from adding this new compatible, instead add a new, generic one and modify the dt-bindings such that we go like:

Quoted 1 line

compatible = "qcom,pm8901", "qcom,pm8xxx-ssbi-pmic"

I'd suggest against this. These PMICs were similar by nature, but not fully compatible. Also we should not be using wildcards in compatible strings.
I think the proposed string is fine.

Herman, I see that these patches are not properly threaded. Please consider using the 'b4' tool for preparing and sending patches. See https://b4.docs.kernel.org/en/latest/contributor/prep.html and
https://b4.docs.kernel.org/en/latest/contributor/send.html

Signature · 2 lines
With best wishes
Dmitry