linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: add IPQ4019 SDHCI VQMMC LDO driver
@ 2020-01-12 11:30 Robert Marko
  2020-01-12 11:30 ` [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document Robert Marko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Robert Marko @ 2020-01-12 11:30 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, linux-kernel, agross, linux-arm-msm
  Cc: Robert Marko, Mantas Pucka

This introduces the IPQ4019 VQMMC LDO driver needed for
the SD/EMMC driver I/O level operation.
This will enable introducing SD/EMMC support for the built-in controller.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 drivers/regulator/Kconfig                   |   7 ++
 drivers/regulator/Makefile                  |   1 +
 drivers/regulator/vqmmc-ipq4019-regulator.c | 111 ++++++++++++++++++++
 3 files changed, 119 insertions(+)
 create mode 100644 drivers/regulator/vqmmc-ipq4019-regulator.c

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 3ee63531f6d5..0a91cf1777c5 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -1077,6 +1077,13 @@ config REGULATOR_VEXPRESS
 	  This driver provides support for voltage regulators available
 	  on the ARM Ltd's Versatile Express platform.
 
+config REGULATOR_VQMMC_IPQ4019
+	tristate "IPQ4019 VQMMC SD LDO regulator support"
+	depends on ARCH_QCOM
+	help
+	  This driver provides support for the VQMMC LDO I/0
+	  voltage regulator of the IPQ4019 SD/EMMC controller.
+
 config REGULATOR_WM831X
 	tristate "Wolfson Microelectronics WM831x PMIC regulators"
 	depends on MFD_WM831X
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 2210ba56f9bd..59f124afd5f5 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -132,6 +132,7 @@ obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o twl6030-regulator.o
 obj-$(CONFIG_REGULATOR_UNIPHIER) += uniphier-regulator.o
 obj-$(CONFIG_REGULATOR_VCTRL) += vctrl-regulator.o
 obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress-regulator.o
+obj-$(CONFIG_REGULATOR_VQMMC_IPQ4019) += vqmmc-ipq4019-regulator.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-ldo.o
diff --git a/drivers/regulator/vqmmc-ipq4019-regulator.c b/drivers/regulator/vqmmc-ipq4019-regulator.c
new file mode 100644
index 000000000000..dae16094d3a2
--- /dev/null
+++ b/drivers/regulator/vqmmc-ipq4019-regulator.c
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright (c) 2019 Mantas Pucka <mantas@8devices.com>
+// Copyright (c) 2019 Robert Marko <robert.marko@sartura.hr>
+//
+// Driver for IPQ4019 SD/MMC controller's I/O LDO voltage regulator
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
+
+static const unsigned int ipq4019_vmmc_voltages[] = {
+	1500000, 1800000, 2500000, 3000000,
+};
+
+static struct regulator_ops ipq4019_regulator_voltage_ops = {
+	.list_voltage = regulator_list_voltage_table,
+	.get_voltage_sel = regulator_get_voltage_sel_regmap,
+	.set_voltage_sel = regulator_set_voltage_sel_regmap,
+};
+
+static struct regulator_desc vmmc_regulator = {
+	.name		= "vmmcq",
+	.ops		= &ipq4019_regulator_voltage_ops,
+	.type		= REGULATOR_VOLTAGE,
+	.owner		= THIS_MODULE,
+	.volt_table	= ipq4019_vmmc_voltages,
+	.n_voltages	= ARRAY_SIZE(ipq4019_vmmc_voltages),
+	.vsel_reg	= 0,
+	.vsel_mask	= 0x3,
+};
+
+const struct regmap_config ipq4019_vmmcq_regmap_config = {
+	.reg_bits	= 32,
+	.reg_stride	= 4,
+	.val_bits	= 32,
+};
+
+static int ipq4019_regulator_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct regulator_init_data *init_data;
+	struct regulator_config cfg = {};
+	struct regulator_dev *rdev;
+	struct resource *res;
+	struct regmap *rmap;
+	void __iomem *base;
+
+	init_data = of_get_regulator_init_data(dev, dev->of_node,
+					       &vmmc_regulator);
+	if (!init_data)
+		return -EINVAL;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	base = devm_ioremap_resource(dev, res);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
+
+	rmap = devm_regmap_init_mmio(dev, base, &ipq4019_vmmcq_regmap_config);
+	if (IS_ERR(rmap))
+		return PTR_ERR(rmap);
+
+	cfg.dev = dev;
+	cfg.init_data = init_data;
+	cfg.of_node = dev->of_node;
+	cfg.regmap = rmap;
+
+	rdev = devm_regulator_register(dev, &vmmc_regulator, &cfg);
+	if (IS_ERR(rdev)) {
+		dev_err(dev, "Failed to register regulator: %ld\n",
+			PTR_ERR(rdev));
+		return PTR_ERR(rdev);
+	}
+	platform_set_drvdata(pdev, rdev);
+
+	return 0;
+}
+
+static int ipq4019_regulator_remove(struct platform_device *pdev)
+{
+	struct regulator_dev *rdev = platform_get_drvdata(pdev);
+
+	regulator_unregister(rdev);
+
+	return 0;
+}
+
+static const struct of_device_id regulator_ipq4019_of_match[] = {
+	{ .compatible = "qcom,vqmmc-ipq4019-regulator", },
+	{},
+};
+
+static struct platform_driver ipq4019_regulator_driver = {
+	.probe = ipq4019_regulator_probe,
+	.remove = ipq4019_regulator_remove,
+	.driver = {
+		.name = "vqmmc-ipq4019-regulator",
+		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(regulator_ipq4019_of_match),
+	},
+};
+module_platform_driver(ipq4019_regulator_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mantas Pucka <mantas@8devices.com>");
+MODULE_DESCRIPTION("IPQ4019 VQMMC voltage regulator");
-- 
2.24.1


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

* [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document
  2020-01-12 11:30 [PATCH 1/3] regulator: add IPQ4019 SDHCI VQMMC LDO driver Robert Marko
@ 2020-01-12 11:30 ` Robert Marko
  2020-01-13 14:41   ` Mark Brown
  2020-01-12 11:30 ` [PATCH 3/3] arm: dts: IPQ4019: add SDHCI VQMMC LDO node Robert Marko
  2020-01-13 15:13 ` Applied "regulator: add IPQ4019 SDHCI VQMMC LDO driver" to the regulator tree Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Robert Marko @ 2020-01-12 11:30 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, linux-kernel, agross, linux-arm-msm
  Cc: Robert Marko

This patch adds bindings for the Qualcomm IPQ4019 VQMMC SD LDO driver.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 .../regulator/vqmmc-ipq4019-regulator.yaml    | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml

diff --git a/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml b/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml
new file mode 100644
index 000000000000..d4d9b618d351
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/vqmmc-ipq4019-regulator.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/vqmmc-ipq4019-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm IPQ4019 VQMMC SD LDO regulator
+
+maintainers:
+  - Robert Marko <robert.marko@sartura.hr>
+
+properties:
+  $nodename:
+    pattern: "regulator(@.*)?$"
+  compatible:
+    const: qcom,vqmmc-ipq4019-regulator
+
+  regulator-name: true
+
+  reg:
+    maxItems: 1
+
+  regulator-min-microvolt:
+    description: smallest voltage consumers may set
+
+  regulator-max-microvolt:
+    description: largest voltage consumers may set
+
+  regulator-always-on:
+    description: boolean, regulator should never be disabled
+    type: boolean
+
+  additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - regulator-name
+  - regulator-min-microvolt
+  - regulator-max-microvolt
+  - regulator-always-on
+
+examples:
+  - |
+    regulator@1948000 {
+      compatible = "qcom,vqmmc-ipq4019-regulator";
+      reg = <0x01948000 0x4>;
+      regulator-name = "vqmmc";
+      regulator-min-microvolt = <1500000>;
+      regulator-max-microvolt = <3000000>;
+      regulator-always-on;
+      status = "disabled";
+    };
+...
-- 
2.24.1


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

* [PATCH 3/3] arm: dts: IPQ4019: add SDHCI VQMMC LDO node
  2020-01-12 11:30 [PATCH 1/3] regulator: add IPQ4019 SDHCI VQMMC LDO driver Robert Marko
  2020-01-12 11:30 ` [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document Robert Marko
@ 2020-01-12 11:30 ` Robert Marko
  2020-01-13 15:13 ` Applied "regulator: add IPQ4019 SDHCI VQMMC LDO driver" to the regulator tree Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Robert Marko @ 2020-01-12 11:30 UTC (permalink / raw)
  To: lgirdwood, broonie, robh+dt, linux-kernel, agross, linux-arm-msm
  Cc: Robert Marko

Since we now have driver for the SDHCI VQMMC LDO needed
for I/0 voltage levels lets introduce the necessary node for it.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 arch/arm/boot/dts/qcom-ipq4019.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi
index d2b53e190954..d95aee50454d 100644
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
@@ -211,6 +211,28 @@
 			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		sdhci: sdhci@7824900 {
+			compatible = "qcom,sdhci-msm-v4";
+			reg = <0x7824900 0x11c>, <0x7824000 0x800>;
+			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+			bus-width = <8>;
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>,
+				 <&gcc GCC_DCD_XO_CLK>;
+			clock-names = "core", "iface", "xo";
+			status = "disabled";
+		};
+
+		vqmmc: regulator@1948000 {
+			compatible = "qcom,vqmmc-ipq4019-regulator";
+			reg = <0x01948000 0x4>;
+			regulator-name = "vqmmc";
+			regulator-min-microvolt = <1500000>;
+			regulator-max-microvolt = <3000000>;
+			regulator-always-on;
+			status = "disabled";
+		};
+
 		blsp_dma: dma@7884000 {
 			compatible = "qcom,bam-v1.7.0";
 			reg = <0x07884000 0x23000>;
-- 
2.24.1


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

* Re: [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document
  2020-01-12 11:30 ` [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document Robert Marko
@ 2020-01-13 14:41   ` Mark Brown
  2020-01-21 10:34     ` Robert Marko
       [not found]     ` <CA+HBbNFZRd6igqUC6qjBdaPQ-37x_p90zCByTxNFDsJsRpMsGw@mail.gmail.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Mark Brown @ 2020-01-13 14:41 UTC (permalink / raw)
  To: Robert Marko; +Cc: lgirdwood, robh+dt, linux-kernel, agross, linux-arm-msm

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

On Sun, Jan 12, 2020 at 12:30:02PM +0100, Robert Marko wrote:

> +  regulator-min-microvolt:
> +    description: smallest voltage consumers may set
> +
> +  regulator-max-microvolt:
> +    description: largest voltage consumers may set

Why are these explicitly specified in this binding?

> +  regulator-always-on:
> +    description: boolean, regulator should never be disabled
> +    type: boolean

If it's not physically possible to disable the regulator then
specifying this property is redundant so...

> +required:
> +  - compatible
> +  - reg
> +  - regulator-name
> +  - regulator-min-microvolt
> +  - regulator-max-microvolt
> +  - regulator-always-on

...requiring it doesn't seem useful.  All the other
regulator-specific properties shouldn't be required either,
unless the user specifies a voltage range we won't allow changes
at all which should be safe and the name is purely cosmetic.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Applied "regulator: add IPQ4019 SDHCI VQMMC LDO driver" to the regulator tree
  2020-01-12 11:30 [PATCH 1/3] regulator: add IPQ4019 SDHCI VQMMC LDO driver Robert Marko
  2020-01-12 11:30 ` [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document Robert Marko
  2020-01-12 11:30 ` [PATCH 3/3] arm: dts: IPQ4019: add SDHCI VQMMC LDO node Robert Marko
@ 2020-01-13 15:13 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Robert Marko
  Cc: agross, broonie, lgirdwood, linux-arm-msm, linux-kernel,
	Mantas Pucka, Mark Brown, robh+dt

The patch

   regulator: add IPQ4019 SDHCI VQMMC LDO driver

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From ebf652b408200504194be32ad0a3f5bb49d6000a Mon Sep 17 00:00:00 2001
From: Robert Marko <robert.marko@sartura.hr>
Date: Sun, 12 Jan 2020 12:30:01 +0100
Subject: [PATCH] regulator: add IPQ4019 SDHCI VQMMC LDO driver

This introduces the IPQ4019 VQMMC LDO driver needed for
the SD/EMMC driver I/O level operation.
This will enable introducing SD/EMMC support for the built-in controller.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://lore.kernel.org/r/20200112113003.11110-1-robert.marko@sartura.hr
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/Kconfig                   |   7 ++
 drivers/regulator/Makefile                  |   1 +
 drivers/regulator/vqmmc-ipq4019-regulator.c | 111 ++++++++++++++++++++
 3 files changed, 119 insertions(+)
 create mode 100644 drivers/regulator/vqmmc-ipq4019-regulator.c

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 9fe2aa9fbbc1..97bfdd47954f 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -1110,6 +1110,13 @@ config REGULATOR_VEXPRESS
 	  This driver provides support for voltage regulators available
 	  on the ARM Ltd's Versatile Express platform.
 
+config REGULATOR_VQMMC_IPQ4019
+	tristate "IPQ4019 VQMMC SD LDO regulator support"
+	depends on ARCH_QCOM
+	help
+	  This driver provides support for the VQMMC LDO I/0
+	  voltage regulator of the IPQ4019 SD/EMMC controller.
+
 config REGULATOR_WM831X
 	tristate "Wolfson Microelectronics WM831x PMIC regulators"
 	depends on MFD_WM831X
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index b8c9072f8500..07bc977c52b0 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -135,6 +135,7 @@ obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o twl6030-regulator.o
 obj-$(CONFIG_REGULATOR_UNIPHIER) += uniphier-regulator.o
 obj-$(CONFIG_REGULATOR_VCTRL) += vctrl-regulator.o
 obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress-regulator.o
+obj-$(CONFIG_REGULATOR_VQMMC_IPQ4019) += vqmmc-ipq4019-regulator.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-ldo.o
diff --git a/drivers/regulator/vqmmc-ipq4019-regulator.c b/drivers/regulator/vqmmc-ipq4019-regulator.c
new file mode 100644
index 000000000000..dae16094d3a2
--- /dev/null
+++ b/drivers/regulator/vqmmc-ipq4019-regulator.c
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright (c) 2019 Mantas Pucka <mantas@8devices.com>
+// Copyright (c) 2019 Robert Marko <robert.marko@sartura.hr>
+//
+// Driver for IPQ4019 SD/MMC controller's I/O LDO voltage regulator
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
+
+static const unsigned int ipq4019_vmmc_voltages[] = {
+	1500000, 1800000, 2500000, 3000000,
+};
+
+static struct regulator_ops ipq4019_regulator_voltage_ops = {
+	.list_voltage = regulator_list_voltage_table,
+	.get_voltage_sel = regulator_get_voltage_sel_regmap,
+	.set_voltage_sel = regulator_set_voltage_sel_regmap,
+};
+
+static struct regulator_desc vmmc_regulator = {
+	.name		= "vmmcq",
+	.ops		= &ipq4019_regulator_voltage_ops,
+	.type		= REGULATOR_VOLTAGE,
+	.owner		= THIS_MODULE,
+	.volt_table	= ipq4019_vmmc_voltages,
+	.n_voltages	= ARRAY_SIZE(ipq4019_vmmc_voltages),
+	.vsel_reg	= 0,
+	.vsel_mask	= 0x3,
+};
+
+const struct regmap_config ipq4019_vmmcq_regmap_config = {
+	.reg_bits	= 32,
+	.reg_stride	= 4,
+	.val_bits	= 32,
+};
+
+static int ipq4019_regulator_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct regulator_init_data *init_data;
+	struct regulator_config cfg = {};
+	struct regulator_dev *rdev;
+	struct resource *res;
+	struct regmap *rmap;
+	void __iomem *base;
+
+	init_data = of_get_regulator_init_data(dev, dev->of_node,
+					       &vmmc_regulator);
+	if (!init_data)
+		return -EINVAL;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	base = devm_ioremap_resource(dev, res);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
+
+	rmap = devm_regmap_init_mmio(dev, base, &ipq4019_vmmcq_regmap_config);
+	if (IS_ERR(rmap))
+		return PTR_ERR(rmap);
+
+	cfg.dev = dev;
+	cfg.init_data = init_data;
+	cfg.of_node = dev->of_node;
+	cfg.regmap = rmap;
+
+	rdev = devm_regulator_register(dev, &vmmc_regulator, &cfg);
+	if (IS_ERR(rdev)) {
+		dev_err(dev, "Failed to register regulator: %ld\n",
+			PTR_ERR(rdev));
+		return PTR_ERR(rdev);
+	}
+	platform_set_drvdata(pdev, rdev);
+
+	return 0;
+}
+
+static int ipq4019_regulator_remove(struct platform_device *pdev)
+{
+	struct regulator_dev *rdev = platform_get_drvdata(pdev);
+
+	regulator_unregister(rdev);
+
+	return 0;
+}
+
+static const struct of_device_id regulator_ipq4019_of_match[] = {
+	{ .compatible = "qcom,vqmmc-ipq4019-regulator", },
+	{},
+};
+
+static struct platform_driver ipq4019_regulator_driver = {
+	.probe = ipq4019_regulator_probe,
+	.remove = ipq4019_regulator_remove,
+	.driver = {
+		.name = "vqmmc-ipq4019-regulator",
+		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(regulator_ipq4019_of_match),
+	},
+};
+module_platform_driver(ipq4019_regulator_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mantas Pucka <mantas@8devices.com>");
+MODULE_DESCRIPTION("IPQ4019 VQMMC voltage regulator");
-- 
2.20.1


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

* Re: [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document
  2020-01-13 14:41   ` Mark Brown
@ 2020-01-21 10:34     ` Robert Marko
       [not found]     ` <CA+HBbNFZRd6igqUC6qjBdaPQ-37x_p90zCByTxNFDsJsRpMsGw@mail.gmail.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Robert Marko @ 2020-01-21 10:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: lgirdwood, robh+dt, linux-kernel, agross, linux-arm-msm

On Mon, Jan 13, 2020 at 3:41 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Sun, Jan 12, 2020 at 12:30:02PM +0100, Robert Marko wrote:
>
> > +  regulator-min-microvolt:
> > +    description: smallest voltage consumers may set
> > +
> > +  regulator-max-microvolt:
> > +    description: largest voltage consumers may set
>
> Why are these explicitly specified in this binding?
You are right, I can simply include them from regulator.yaml
>
> > +  regulator-always-on:
> > +    description: boolean, regulator should never be disabled
> > +    type: boolean
>
> If it's not physically possible to disable the regulator then
> specifying this property is redundant so...
Yes, regulator cant be turned off.
>
> > +required:
> > +  - compatible
> > +  - reg
> > +  - regulator-name
> > +  - regulator-min-microvolt
> > +  - regulator-max-microvolt
> > +  - regulator-always-on
>
> ...requiring it doesn't seem useful.  All the other
> regulator-specific properties shouldn't be required either,
> unless the user specifies a voltage range we won't allow changes
> at all which should be safe and the name is purely cosmetic.
Are bindings even required at all here then?

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

* Re: [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document
       [not found]     ` <CA+HBbNFZRd6igqUC6qjBdaPQ-37x_p90zCByTxNFDsJsRpMsGw@mail.gmail.com>
@ 2020-01-21 16:27       ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-01-21 16:27 UTC (permalink / raw)
  To: Robert Marko; +Cc: lgirdwood, robh+dt, linux-kernel, agross, linux-arm-msm

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]

On Tue, Jan 21, 2020 at 11:33:12AM +0100, Robert Marko wrote:
> On Mon, Jan 13, 2020 at 3:41 PM Mark Brown <broonie@kernel.org> wrote:

> > ...requiring it doesn't seem useful.  All the other
> > regulator-specific properties shouldn't be required either,
> > unless the user specifies a voltage range we won't allow changes
> > at all which should be safe and the name is purely cosmetic.

> Are bindings even required at all here then?

Even if there's no specific properties you still need the compatible
string and documentation that it should use the generic regulator
binding.  This should be trivial but it means that we can do things like
validate system DTs.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2020-01-21 16:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 11:30 [PATCH 1/3] regulator: add IPQ4019 SDHCI VQMMC LDO driver Robert Marko
2020-01-12 11:30 ` [PATCH 2/3] dt-bindings: vqmmc-ipq4019-regulator: add binding document Robert Marko
2020-01-13 14:41   ` Mark Brown
2020-01-21 10:34     ` Robert Marko
     [not found]     ` <CA+HBbNFZRd6igqUC6qjBdaPQ-37x_p90zCByTxNFDsJsRpMsGw@mail.gmail.com>
2020-01-21 16:27       ` Mark Brown
2020-01-12 11:30 ` [PATCH 3/3] arm: dts: IPQ4019: add SDHCI VQMMC LDO node Robert Marko
2020-01-13 15:13 ` Applied "regulator: add IPQ4019 SDHCI VQMMC LDO driver" to the regulator tree Mark Brown

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