Skip to contentSkip to conversation

Support for Qualcomm QPNP PMIC's

PATCH Superseded Stanimir Varbanov 5 participants 15 messages Jul 17, 2014 – Jul 30, 2014

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Support for Qualcomm QPNP PMIC's

Hello everyone,

Here is the continuation of patch sets sent recently about Qualcomm QPNP SPMI PMICs.

The previous version of the patch set can be found at [1].

Changes since v1:
- removed completely custom *of* parser
- renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
- now MFD_PM8XXX_SPMI Kconfig option depends on SPMI

Removing of the custom *of* parser leads to that that the *reg* devicetree property cannot exist and therefore cannot be parsed to get PMIC peripheral resources. I took this step aside because no one from mfd drivers does this parsing. This will lead to inconvenience in the peripheral drivers to define internally the SPMI base addresses depending on the compatible property i.e. PMIC version.

Comments are welcome!

regards,
Stan

[1] https://lkml.org/lkml/2014/7/8/428

Josh Cartwright (1):
mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs

Stanimir Varbanov (3):
mfd: pm8xxx-spmi: document DT bindings for Qualcomm SPMI PMICs
ARM: DT: qcom: add pm8941 and pm8841 device nodes
mfd: pm8921: rename pm8921-core driver

 .../devicetree/bindings/mfd/qcom,pm8xxx-spmi.txt   |   49 +++++++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi                |   37 ++++++++++++
 drivers/mfd/Kconfig                                |   30 +++++++--
 drivers/mfd/Makefile                               |    3 +-
 drivers/mfd/pm8xxx-spmi.c                          |   63 ++++++++++++++++++++
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c}       |   38 ++++++------
 6 files changed, 193 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,pm8xxx-spmi.txt
 create mode 100644 drivers/mfd/pm8xxx-spmi.c
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)
#1 lore raw

PATCH v2 1/4 mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs

From: Josh Cartwright <[email protected]>

The Qualcomm SPMI PMIC chips are components used with the Snapdragon 800 series SoC family. This driver exists largely as a glue mfd component, it exists to be an owner of an SPMI regmap for children devices described in device tree.

---
 drivers/mfd/Kconfig       |   16 +++++++++++
 drivers/mfd/Makefile      |    1 +
 drivers/mfd/pm8xxx-spmi.c |   63 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/pm8xxx-spmi.c
drivers/mfd/Kconfig +16 -0
index 6cc4b6a..122e2d9 100644
@@ -524,6 +524,22 @@ config MFD_PM8921_CORE
 	  Say M here if you want to include support for PM8921 chip as a module.
 	  This will build a module called "pm8921-core".
 
+config MFD_PM8XXX_SPMI
+	tristate "Qualcomm PM8XXX SPMI PMICs"
+	depends on ARCH_QCOM || COMPILE_TEST
+	depends on OF
+	depends on SPMI
+	select MFD_PM8XXX
+	select REGMAP_SPMI
+	help
+	  This enables support for the Qualcomm PM8XXX SPMI PMICs.
+	  These PMICs are currently used with the Snapdragon 800 series of
+	  SoCs.  Note, that this will only be useful paired with descriptions
+	  of the independent functions as children nodes in the device tree.
+
+	  Say M here if you want to include support for the PM8XXX SPMI PMIC
+	  series as a module.  The module will be called "pm8xxx-spmi".
+
 config MFD_RDC321X
 	tristate "RDC R-321x southbridge"
 	select MFD_CORE
drivers/mfd/Makefile +1 -0
index 8afedba..93d82cc 100644
@@ -153,6 +153,7 @@ obj-$(CONFIG_MFD_SI476X_CORE)	+= si476x-core.o
 obj-$(CONFIG_MFD_CS5535)	+= cs5535-mfd.o
 obj-$(CONFIG_MFD_OMAP_USB_HOST)	+= omap-usb-host.o omap-usb-tll.o
 obj-$(CONFIG_MFD_PM8921_CORE) 	+= pm8921-core.o ssbi.o
+obj-$(CONFIG_MFD_PM8XXX_SPMI)	+= pm8xxx-spmi.o
 obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
drivers/mfd/pm8xxx-spmi.c new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
1.7.0.4
Acked-by on v2 1/4
#2 lore raw

Re: [PATCH v2 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs

Quoted 9 lines · Stanimir Varbanov

From: Josh Cartwright <[email protected]>

The Qualcomm SPMI PMIC chips are components used with the Snapdragon 800 series SoC family. This driver exists largely as a glue mfd component, it exists to be an owner of an SPMI regmap for children devices described in device tree.

Needs to be signed off by the author.

Quoted 6 lines
---
 drivers/mfd/Kconfig       |   16 +++++++++++
 drivers/mfd/Makefile      |    1 +
 drivers/mfd/pm8xxx-spmi.c |   63 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/pm8xxx-spmi.c

[...]

Quoted 4 lines

+++ b/drivers/mfd/pm8xxx-spmi.c

drivers/mfd/pm8xxx-spmi.c new file +2 -0
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.

drivers/mfd/pm8xxx-spmi.c line 12

Quoted 10 lines
drivers/mfd/pm8xxx-spmi.c new file +10 -0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */

There should be a '\n' here.

Quoted 5 lines
drivers/mfd/pm8xxx-spmi.c new file +5 -0
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/spmi.h>
+#include <linux/regmap.h>
+#include <linux/of_platform.h>

[...]

drivers/mfd/pm8xxx-spmi.c line 62

Quoted 3 lines
drivers/mfd/pm8xxx-spmi.c new file +3 -0
+MODULE_DESCRIPTION("PM8XXX SPMI PMIC driver");
+MODULE_ALIAS("platform:" KBUILD_MODNAME);
+MODULE_AUTHOR("The Linux Foundation");

The Linux Foundation did not write this patch.

Quoted 1 line

+MODULE_LICENSE("GPL v2");

Appart from that:

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

Re: [PATCH v2 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs

Quoted 23 lines · Lee Jones
Quoted 9 lines · Stanimir Varbanov

From: Josh Cartwright <[email protected]>

The Qualcomm SPMI PMIC chips are components used with the Snapdragon 800 series SoC family. This driver exists largely as a glue mfd component, it exists to be an owner of an SPMI regmap for children devices described in device tree.

Needs to be signed off by the author.

Quoted 6 lines
---
 drivers/mfd/Kconfig       |   16 +++++++++++
 drivers/mfd/Makefile      |    1 +
 drivers/mfd/pm8xxx-spmi.c |   63 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mfd/pm8xxx-spmi.c

[...]

Quoted 16 lines
Quoted 4 lines

+++ b/drivers/mfd/pm8xxx-spmi.c

drivers/mfd/pm8xxx-spmi.c new file +2 -0
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.

drivers/mfd/pm8xxx-spmi.c line 12

Quoted 10 lines
drivers/mfd/pm8xxx-spmi.c new file +10 -0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */

There should be a '\n' here.

OK.

Quoted 11 lines
Quoted 6 lines
drivers/mfd/pm8xxx-spmi.c new file +5 -0
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/spmi.h>
+#include <linux/regmap.h>
+#include <linux/of_platform.h>

[...]

drivers/mfd/pm8xxx-spmi.c line 61

Quoted 2 lines
drivers/mfd/pm8xxx-spmi.c new file +2 -0
+MODULE_DESCRIPTION("PM8XXX SPMI PMIC driver");
+MODULE_ALIAS("platform:" KBUILD_MODNAME);

I will change this to:

MODULE_ALIAS("spmi:pm8xxx-spmi");

Quoted 3 lines
Quoted 1 line

+MODULE_AUTHOR("The Linux Foundation");

The Linux Foundation did not write this patch.

OK, I will change the author or remove the tag completely.

Quoted 7 lines
Quoted 2 lines

+MODULE_LICENSE("GPL v2");

Appart from that:

Thanks. I will resend the whole patch set with your acks.

Signature · 2 lines
regards,
Stan
#4 lore raw

PATCH v2 2/4 mfd: pm8xxx-spmi: document DT bindings for Qualcomm SPMI PMICs

In reply to Stanimir Varbanov

Document DT bindings used to describe the Qualcomm SPMI PMICs. Currently the SPMI PMICs supported are pm8941, pm8841 and pma8084.

---
 .../devicetree/bindings/mfd/qcom,pm8xxx-spmi.txt   |   49 ++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/qcom,pm8xxx-spmi.txt
Documentation/devicetree/bindings/mfd/qcom,pm8xxx-spmi.txt new file +49 -0
new file mode 100644
index 0000000..2b7f5b6
@@ -0,0 +1,49 @@
+          Qualcomm PM8XXX SPMI PMICs multi-function device bindings
+
+The Qualcomm PM8XXX series presently includes PM8941, PM8841 and PMA8084
+PMICs.  These PMICs use a QPNP scheme through SPMI interface.
+QPNP is effectively a partitioning scheme for dividing the SPMI extended
+register space up into logical pieces, and set of fixed register
+locations/definitions within these regions, with some of these regions
+specifically used for interrupt handling.
+
+The QPNP PMICs are used with the Qualcomm Snapdragon series SoCs, and are
+interfaced to the chip via the SPMI (System Power Management Interface) bus.
+Support for multiple independent functions are implemented by splitting the
+16-bit SPMI slave address space into 256 smaller fixed-size regions, 256 bytes
+each. A function can consume one or more of these fixed-size register regions.
+
+Required properties:
+- compatible:      Should contain one of:
+                     "qcom,pm8941"
+                     "qcom,pm8841"
+                     "qcom,pma8084"
+- reg:             Specifies the SPMI USID slave address for this device.
+                   For more information see:
+                   Documentation/devicetree/bindings/spmi/spmi.txt
+
+Required properties for peripheral child nodes:
+- compatible:      Should contain "qcom,pm8xxx-xxx", where "xxx" is
+                   peripheral name. The "pm8xxx" can be any of supported PMICs,
+                   see example below.
+
+Optional properties for peripheral child nodes:
+- interrupts:      Interrupts are specified as a 4-tuple. For more information
+                   see:
+                   Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
+- interrupt-names: Corresponding interrupt name to the interrupts property
+
+Each child node represents a function of the PMIC.
+
+Example:
+
+	pm8941 at 0 {
+		compatible = "qcom,pm8941";
+		reg = <0x0 SPMI_USID>;
+
+		rtc {
+			compatible = "qcom,pm8941-rtc";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "alarm";
+		};
+	};
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH v2 3/4 ARM: DT: qcom: add pm8941 and pm8841 device nodes

In reply to Stanimir Varbanov

The pm8941 and pm8841 spmi devicetree nodes are childrens of spmi pmic arbiter. The msm8974 SoC uses two PMIC chips pm8941 and pm8841. Every PMIC chip has two spmi bus slave id's.

---
 arch/arm/boot/dts/qcom-msm8974.dtsi |   37 +++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)
arch/arm/boot/dts/qcom-msm8974.dtsi +37 -0
index 69dca2a..cb05603 100644
@@ -3,6 +3,7 @@
 #include "skeleton.dtsi"
 
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/spmi/spmi.h>
 
 / {
 	model = "Qualcomm MSM8974";
@@ -236,5 +237,41 @@
 			#interrupt-cells = <2>;
 			interrupts = <0 208 0>;
 		};
+
+		spmi at fc4cf000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg-names = "core", "intr", "cnfg";
+			reg = <0xfc4cf000 0x1000>,
+			      <0xfc4cb000 0x1000>,
+			      <0xfc4ca000 0x1000>;
+			interrupt-names = "periph_irq";
+			interrupts = <0 190 0>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+
+			usid0: pm8941 at 0 {
+				compatible = "qcom,pm8941";
+				reg = <0x0 SPMI_USID>;
+			};
+
+			usid1: pm8941 at 1 {
+				compatible = "qcom,pm8941";
+				reg = <0x1 SPMI_USID>;
+			};
+
+			usid4: pm8841 at 4 {
+				compatible = "qcom,pm8841";
+				reg = <0x4 SPMI_USID>;
+			};
+
+			usid5: pm8841 at 5 {
+				compatible = "qcom,pm8841";
+				reg = <0x5 SPMI_USID>;
+			};
+		};
 	};
 };
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH v2 4/4 mfd: pm8921: rename pm8921-core driver

In reply to Stanimir Varbanov

The pm8921-core driver presently supports pm8921 and pm8058 Qualcomm PMICs. To avoid confusion with new generation PMICs (like pm8941) rename the pm8921-core driver to more appropriate name pm8xxx-ssbi, which reflects better that those chips use SSBI interface.

---
 drivers/mfd/Kconfig                          |   14 +++++-----
 drivers/mfd/Makefile                         |    2 +-
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} |   38 +++++++++++++-------------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)
drivers/mfd/Kconfig +7 -7
index 122e2d9..884bc32 100644
@@ -507,8 +507,8 @@ config UCB1400_CORE
 config MFD_PM8XXX
 	tristate
 
-config MFD_PM8921_CORE
-	tristate "Qualcomm PM8921 PMIC chip"
+config MFD_PM8XXX_SSBI
+	tristate "Qualcomm PM8XXX SSBI PMICs"
 	depends on (ARM || HEXAGON)
 	select IRQ_DOMAIN
 	select MFD_CORE
@@ -516,13 +516,13 @@ config MFD_PM8921_CORE
 	select REGMAP
 	help
 	  If you say yes to this option, support will be included for the
-	  built-in PM8921 PMIC chip.
+	  built-in PM8921 and PM8058 PMIC chips.
 
-	  This is required if your board has a PM8921 and uses its features,
-	  such as: MPPs, GPIOs, regulators, interrupts, and PWM.
+	  This is required if your board has a PM8921 or PM8058 and uses
+	  its features, such as: MPPs, GPIOs, regulators, interrupts, and PWM.
 
-	  Say M here if you want to include support for PM8921 chip as a module.
-	  This will build a module called "pm8921-core".
+	  Say M here if you want to include support for PM8921 or PM8058 chip
+	  as a module. This will build a module called "pm8xxx-ssbi".
 
 config MFD_PM8XXX_SPMI
 	tristate "Qualcomm PM8XXX SPMI PMICs"
drivers/mfd/Makefile +1 -1
index 93d82cc..d332085 100644
@@ -152,7 +152,7 @@ obj-$(CONFIG_MFD_SI476X_CORE)	+= si476x-core.o
 
 obj-$(CONFIG_MFD_CS5535)	+= cs5535-mfd.o
 obj-$(CONFIG_MFD_OMAP_USB_HOST)	+= omap-usb-host.o omap-usb-tll.o
-obj-$(CONFIG_MFD_PM8921_CORE) 	+= pm8921-core.o ssbi.o
+obj-$(CONFIG_MFD_PM8XXX_SSBI) 	+= pm8xxx-ssbi.o ssbi.o
 obj-$(CONFIG_MFD_PM8XXX_SPMI)	+= pm8xxx-spmi.o
 obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
drivers/mfd/pm8xxx-ssbi.c renamed from drivers/mfd/pm8921-core.c +19 -19
similarity index 92%
rename from drivers/mfd/pm8921-core.c
rename to drivers/mfd/pm8xxx-ssbi.c
index 9595138..102d7fb 100644
@@ -277,14 +277,14 @@ static const struct regmap_config ssbi_regmap_config = {
 	.reg_write = ssbi_reg_write
 };
 
-static const struct of_device_id pm8921_id_table[] = {
+static const struct of_device_id pm8xxx_id_table[] = {
 	{ .compatible = "qcom,pm8058", },
 	{ .compatible = "qcom,pm8921", },
 	{ }
 };
-MODULE_DEVICE_TABLE(of, pm8921_id_table);
+MODULE_DEVICE_TABLE(of, pm8xxx_id_table);
 
-static int pm8921_probe(struct platform_device *pdev)
+static int pm8xxx_probe(struct platform_device *pdev)
 {
 	struct regmap *regmap;
 	int irq, rc;
@@ -354,18 +354,18 @@ static int pm8921_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static int pm8921_remove_child(struct device *dev, void *unused)
+static int pm8xxx_remove_child(struct device *dev, void *unused)
 {
 	platform_device_unregister(to_platform_device(dev));
 	return 0;
 }
 
-static int pm8921_remove(struct platform_device *pdev)
+static int pm8xxx_remove(struct platform_device *pdev)
 {
 	int irq = platform_get_irq(pdev, 0);
 	struct pm_irq_chip *chip = platform_get_drvdata(pdev);
 
-	device_for_each_child(&pdev->dev, NULL, pm8921_remove_child);
+	device_for_each_child(&pdev->dev, NULL, pm8xxx_remove_child);
 	irq_set_chained_handler(irq, NULL);
 	irq_set_handler_data(irq, NULL);
 	irq_domain_remove(chip->irqdomain);
@@ -373,29 +373,29 @@ static int pm8921_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct platform_driver pm8921_driver = {
-	.probe		= pm8921_probe,
-	.remove		= pm8921_remove,
+static struct platform_driver pm8xxx_driver = {
+	.probe		= pm8xxx_probe,
+	.remove		= pm8xxx_remove,
 	.driver		= {
-		.name	= "pm8921-core",
+		.name	= "pm8xxx-ssbi",
 		.owner	= THIS_MODULE,
-		.of_match_table = pm8921_id_table,
+		.of_match_table = pm8xxx_id_table,
 	},
 };
 
-static int __init pm8921_init(void)
+static int __init pm8xxx_init(void)
 {
-	return platform_driver_register(&pm8921_driver);
+	return platform_driver_register(&pm8xxx_driver);
 }
-subsys_initcall(pm8921_init);
+subsys_initcall(pm8xxx_init);
 
-static void __exit pm8921_exit(void)
+static void __exit pm8xxx_exit(void)
 {
-	platform_driver_unregister(&pm8921_driver);
+	platform_driver_unregister(&pm8xxx_driver);
 }
-module_exit(pm8921_exit);
+module_exit(pm8xxx_exit);
 
 MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("PMIC 8921 core driver");
+MODULE_DESCRIPTION("PMIC PM8XXX SSBI driver");
 MODULE_VERSION("1.0");
-MODULE_ALIAS("platform:pm8921-core");
+MODULE_ALIAS("platform:pm8xxx-ssbi");
Signature · 1 line
1.7.0.4
#7 lore raw

Re: [PATCH v2 4/4] mfd: pm8921: rename pm8921-core driver

Quoted 6 lines · Stanimir Varbanov

The pm8921-core driver presently supports pm8921 and pm8058 Qualcomm PMICs. To avoid confusion with new generation PMICs (like pm8941) rename the pm8921-core driver to more appropriate name pm8xxx-ssbi, which reflects better that those chips use SSBI interface.

Quoted 7 lines
---
 drivers/mfd/Kconfig                          |   14 +++++-----
 drivers/mfd/Makefile                         |    2 +-
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} |   38 +++++++++++++-------------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)

.
[Nope]

Quoted 7 lines

MODULE_LICENSE("GPL v2");

drivers/mfd/pm8xxx-ssbi.c renamed from drivers/mfd/pm8921-core.c +2 -2
-MODULE_DESCRIPTION("PMIC 8921 core driver");
+MODULE_DESCRIPTION("PMIC PM8XXX SSBI driver");
 MODULE_VERSION("1.0");
-MODULE_ALIAS("platform:pm8921-core");
+MODULE_ALIAS("platform:pm8xxx-ssbi");

How about adding the module author as svarbanov at mm-sol.com/qcom?

      MODULE_AUTHOR("SVARBANOV<[email protected]>");
Quoted 8 lines

--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#8 lore raw

Re: [PATCH v2 4/4] mfd: pm8921: rename pm8921-core driver

Quoted 14 lines · Prakash Burla
Quoted 6 lines · Stanimir Varbanov

The pm8921-core driver presently supports pm8921 and pm8058 Qualcomm PMICs. To avoid confusion with new generation PMICs (like pm8941) rename the pm8921-core driver to more appropriate name pm8xxx-ssbi, which reflects better that those chips use SSBI interface.

Quoted 7 lines
---
 drivers/mfd/Kconfig                          |   14 +++++-----
 drivers/mfd/Makefile                         |    2 +-
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} |   38 +++++++++++++-------------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)
Quoted 2 lines

.
[Nope]

What does this mean?

Quoted 8 lines
Quoted 7 lines

MODULE_LICENSE("GPL v2");

drivers/mfd/pm8xxx-ssbi.c renamed from drivers/mfd/pm8921-core.c +2 -2
-MODULE_DESCRIPTION("PMIC 8921 core driver");
+MODULE_DESCRIPTION("PMIC PM8XXX SSBI driver");
 MODULE_VERSION("1.0");
-MODULE_ALIAS("platform:pm8921-core");
+MODULE_ALIAS("platform:pm8xxx-ssbi");

How about adding the module author as svarbanov at mm-sol.com/qcom?

      MODULE_AUTHOR("SVARBANOV<[email protected]>");

Module author has the same standards as Git author.

MODULE_AUTHOR("Stanimir Varbanov <[email protected]>");

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Acked-by on v2 4/4
#9 lore raw

Re: [PATCH v2 4/4] mfd: pm8921: rename pm8921-core driver

In reply to Stanimir Varbanov
Quoted 6 lines · Stanimir Varbanov

The pm8921-core driver presently supports pm8921 and pm8058 Qualcomm PMICs. To avoid confusion with new generation PMICs (like pm8941) rename the pm8921-core driver to more appropriate name pm8xxx-ssbi, which reflects better that those chips use SSBI interface.

Quoted 7 lines
---
 drivers/mfd/Kconfig                          |   14 +++++-----
 drivers/mfd/Makefile                         |    2 +-
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} |   38 +++++++++++++-------------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)

Patch looks fine to me.

I'm assuming we want to wait for the others in the set to be ready before applying?

[...]

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw

Re: [PATCH v2 4/4] mfd: pm8921: rename pm8921-core driver

Quoted 16 lines · Lee Jones
Quoted 6 lines · Stanimir Varbanov

The pm8921-core driver presently supports pm8921 and pm8058 Qualcomm PMICs. To avoid confusion with new generation PMICs (like pm8941) rename the pm8921-core driver to more appropriate name pm8xxx-ssbi, which reflects better that those chips use SSBI interface.

Quoted 7 lines
---
 drivers/mfd/Kconfig                          |   14 +++++-----
 drivers/mfd/Makefile                         |    2 +-
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} |   38 +++++++++++++-------------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)
Quoted 6 lines

Patch looks fine to me.

I'm assuming we want to wait for the others in the set to be ready before applying?

yes, I think you will need an ack for the DT binding document?

Signature · 2 lines
regards,
Stan
#11 lore raw

Re: [PATCH v2 4/4] mfd: pm8921: rename pm8921-core driver

Quoted 17 lines · Stanimir Varbanov
Quoted 16 lines · Lee Jones
Quoted 13 lines · Stanimir Varbanov

The pm8921-core driver presently supports pm8921 and pm8058 Qualcomm PMICs. To avoid confusion with new generation PMICs (like pm8941) rename the pm8921-core driver to more appropriate name pm8xxx-ssbi, which reflects better that those chips use SSBI interface.

---
 drivers/mfd/Kconfig                          |   14 +++++-----
 drivers/mfd/Makefile                         |    2 +-
 drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} |   38 +++++++++++++-------------
 3 files changed, 27 insertions(+), 27 deletions(-)
 rename drivers/mfd/{pm8921-core.c => pm8xxx-ssbi.c} (92%)
Quoted 8 lines
Quoted 6 lines

Patch looks fine to me.

I'm assuming we want to wait for the others in the set to be ready before applying?

yes, I think you will need an ack for the DT binding document?

I prefer to leave these to the DT guys.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#12 lore raw
In reply to Stanimir Varbanov
Quoted 12 lines · Stanimir Varbanov

Hello everyone,

Here is the continuation of patch sets sent recently about Qualcomm QPNP SPMI PMICs.

The previous version of the patch set can be found at [1].

Changes since v1:
- removed completely custom *of* parser
- renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
- now MFD_PM8XXX_SPMI Kconfig option depends on SPMI

Quoted 6 lines

Removing of the custom *of* parser leads to that that the *reg* devicetree property cannot exist and therefore cannot be parsed to get PMIC peripheral resources. I took this step aside because no one from mfd drivers does this parsing. This will lead to inconvenience in the peripheral drivers to define internally the SPMI base addresses depending on the compatible property i.e. PMIC version.

We should teach the of platform layer to translate reg properties up until the point that they can't be translated anymore. If they can't be translated all the way back to cpu addresses we can make the resource have IORESOURCE_REG instead of IORESOURCE_MEM and then said pmic platform drivers can use platform_get_resource() with IORESOURCE_REG instead of IORESOURCE_MEM to get the addresses.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#13 lore raw
Quoted 20 lines · Stephen Boyd
Quoted 12 lines · Stanimir Varbanov

Hello everyone,

Here is the continuation of patch sets sent recently about Qualcomm QPNP SPMI PMICs.

The previous version of the patch set can be found at [1].

Changes since v1:
- removed completely custom *of* parser
- renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
- now MFD_PM8XXX_SPMI Kconfig option depends on SPMI

Quoted 6 lines

Removing of the custom *of* parser leads to that that the *reg* devicetree property cannot exist and therefore cannot be parsed to get PMIC peripheral resources. I took this step aside because no one from mfd drivers does this parsing. This will lead to inconvenience in the peripheral drivers to define internally the SPMI base addresses depending on the compatible property i.e. PMIC version.

Quoted 7 lines

We should teach the of platform layer to translate reg properties up until the point that they can't be translated anymore. If they can't be translated all the way back to cpu addresses we can make the resource have IORESOURCE_REG instead of IORESOURCE_MEM and then said pmic platform drivers can use platform_get_resource() with IORESOURCE_REG instead of IORESOURCE_MEM to get the addresses.

I considered this as an option, if it is acceptable by OF maintainers it will be awesome.

Rob, Grant, is that feasible?

Signature · 2 lines
regards,
Stan
#14 lore raw
Quoted 29 lines · Stanimir Varbanov
Quoted 20 lines · Stephen Boyd
Quoted 12 lines · Stanimir Varbanov

Hello everyone,

Here is the continuation of patch sets sent recently about Qualcomm QPNP SPMI PMICs.

The previous version of the patch set can be found at [1].

Changes since v1:
- removed completely custom *of* parser
- renamed the mfd driver from qpnp-spmi to pm8xxx-spmi
- now MFD_PM8XXX_SPMI Kconfig option depends on SPMI

Quoted 6 lines

Removing of the custom *of* parser leads to that that the *reg* devicetree property cannot exist and therefore cannot be parsed to get PMIC peripheral resources. I took this step aside because no one from mfd drivers does this parsing. This will lead to inconvenience in the peripheral drivers to define internally the SPMI base addresses depending on the compatible property i.e. PMIC version.

Quoted 7 lines

We should teach the of platform layer to translate reg properties up until the point that they can't be translated anymore. If they can't be translated all the way back to cpu addresses we can make the resource have IORESOURCE_REG instead of IORESOURCE_MEM and then said pmic platform drivers can use platform_get_resource() with IORESOURCE_REG instead of IORESOURCE_MEM to get the addresses.

Quoted 4 lines

I considered this as an option, if it is acceptable by OF maintainers it will be awesome.

Rob, Grant, is that feasible?

It doesn't really make sense to do that kind of translation because the resulting address only makes sense if you also know which node the translation stopped at.

A better solution is a new api for retrieving bus-local addresses instead of a global physical address. That would requires passing in a node or device to use as the translation root. If the child isn't a descended of that node, or if translation isn't possible then it should straight out fail instead of providing a partially translated value.

g.