All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] SY8106 regulator support and enable it on Orange Pi PC
@ 2018-04-23 14:46 ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-sunxi, Icenowy Zheng

This patchset adds dt-bindings and driver for Silergy SY8106A, and then
utilize it on the Orange Pi PC board, which uses SY8016A as its CPUX
(main ARM CPU cluster in an Allwinner SoC) power supply.

The driver's functionality is restricted now, mainly {en,dis}able function
is not yet implemented, as it cannot be debugged on Orange Pi PC
(disable it will kill Linux).

Ondrej Jirman (3):
  dt-bindings: add binding for the SY8106A voltage regulator
  regulator: add support for SY8106A regulator
  ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC

 .../bindings/regulator/sy8106a-regulator.txt       |  23 +++
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |  28 ++++
 drivers/regulator/Kconfig                          |   8 +-
 drivers/regulator/Makefile                         |   2 +-
 drivers/regulator/sy8106a-regulator.c              | 183 +++++++++++++++++++++
 5 files changed, 242 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
 create mode 100644 drivers/regulator/sy8106a-regulator.c

-- 
2.15.1

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

* [PATCH v3 0/3] SY8106 regulator support and enable it on Orange Pi PC
@ 2018-04-23 14:46 ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng

This patchset adds dt-bindings and driver for Silergy SY8106A, and then
utilize it on the Orange Pi PC board, which uses SY8016A as its CPUX
(main ARM CPU cluster in an Allwinner SoC) power supply.

The driver's functionality is restricted now, mainly {en,dis}able function
is not yet implemented, as it cannot be debugged on Orange Pi PC
(disable it will kill Linux).

Ondrej Jirman (3):
  dt-bindings: add binding for the SY8106A voltage regulator
  regulator: add support for SY8106A regulator
  ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC

 .../bindings/regulator/sy8106a-regulator.txt       |  23 +++
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |  28 ++++
 drivers/regulator/Kconfig                          |   8 +-
 drivers/regulator/Makefile                         |   2 +-
 drivers/regulator/sy8106a-regulator.c              | 183 +++++++++++++++++++++
 5 files changed, 242 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
 create mode 100644 drivers/regulator/sy8106a-regulator.c

-- 
2.15.1

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

* [PATCH v3 0/3] SY8106 regulator support and enable it on Orange Pi PC
@ 2018-04-23 14:46 ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset adds dt-bindings and driver for Silergy SY8106A, and then
utilize it on the Orange Pi PC board, which uses SY8016A as its CPUX
(main ARM CPU cluster in an Allwinner SoC) power supply.

The driver's functionality is restricted now, mainly {en,dis}able function
is not yet implemented, as it cannot be debugged on Orange Pi PC
(disable it will kill Linux).

Ondrej Jirman (3):
  dt-bindings: add binding for the SY8106A voltage regulator
  regulator: add support for SY8106A regulator
  ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC

 .../bindings/regulator/sy8106a-regulator.txt       |  23 +++
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |  28 ++++
 drivers/regulator/Kconfig                          |   8 +-
 drivers/regulator/Makefile                         |   2 +-
 drivers/regulator/sy8106a-regulator.c              | 183 +++++++++++++++++++++
 5 files changed, 242 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
 create mode 100644 drivers/regulator/sy8106a-regulator.c

-- 
2.15.1

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

* [PATCH v3 1/3] dt-bindings: add binding for the SY8106A voltage regulator
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous@megous.com>

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in v3:
- Added silergy,fixed-microvolt property.

Changes in v2:
- Added Chen-Yu's Reviewed tag and Rob's ACK tag.
- Specify regulator.txt's directory.

 .../bindings/regulator/sy8106a-regulator.txt       | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.15.1

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

* [PATCH v3 1/3] dt-bindings: add binding for the SY8106A voltage regulator
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
Changes in v3:
- Added silergy,fixed-microvolt property.

Changes in v2:
- Added Chen-Yu's Reviewed tag and Rob's ACK tag.
- Specify regulator.txt's directory.

 .../bindings/regulator/sy8106a-regulator.txt       | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.15.1

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

* [PATCH v3 1/3] dt-bindings: add binding for the SY8106A voltage regulator
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ondrej Jirman <megous@megous.com>

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in v3:
- Added silergy,fixed-microvolt property.

Changes in v2:
- Added Chen-Yu's Reviewed tag and Rob's ACK tag.
- Specify regulator.txt's directory.

 .../bindings/regulator/sy8106a-regulator.txt       | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.15.1

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous@megous.com>

SY8106A is an I2C attached single output regulator made by Silergy Corp,
which is used on several Allwinner H3/H5 SBCs to control the power
supply of the ARM cores.

Add a driver for it.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message, remove enable/disable code, add default
 ramp_delay, add comment for go bit, add code for fixed mode voltage]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
---
Changes in v3:
- Return the fixed voltage defined in device tree when I2C regulating
  not enabled (in this situation the register may contain no valid
  voltage data).

Changes in v2:
- Dropped the enable/disable code.
- Added default ramp_delay value.
- Added comment for the "go bit".

 MAINTAINERS                           |   6 ++
 drivers/regulator/Kconfig             |   7 ++
 drivers/regulator/Makefile            |   2 +-
 drivers/regulator/sy8106a-regulator.c | 175 ++++++++++++++++++++++++++++++++++
 4 files changed, 189 insertions(+), 1 deletion(-)
 create mode 100644 drivers/regulator/sy8106a-regulator.c

diff --git a/MAINTAINERS b/MAINTAINERS
index a33643739820..e0cb78568458 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13464,6 +13464,12 @@ S:	Supported
 F:	net/switchdev/
 F:	include/net/switchdev.h
 
+SY8106A REGULATOR DRIVER
+M:	Icenowy Zheng <icenowy@aosc.io>
+S:	Maintained
+F:	drivers/regulator/sy8106a-regulator.c
+F:	Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
+
 SYNC FILE FRAMEWORK
 M:	Sumit Semwal <sumit.semwal@linaro.org>
 R:	Gustavo Padovan <gustavo@padovan.org>
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 097f61784a7d..4efae3b7e746 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -801,6 +801,13 @@ config REGULATOR_STW481X_VMMC
 	  This driver supports the internal VMMC regulator in the STw481x
 	  PMIC chips.
 
+config REGULATOR_SY8106A
+	tristate "Silergy SY8106A regulator"
+	depends on I2C && (OF || COMPILE_TEST)
+	select REGMAP_I2C
+	help
+	  This driver supports SY8106A single output regulator.
+
 config REGULATOR_TPS51632
 	tristate "TI TPS51632 Power Regulator"
 	depends on I2C
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 590674fbecd7..d81fb02bd6e9 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -100,6 +100,7 @@ obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
 obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
 obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
 obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
+obj-$(CONFIG_REGULATOR_SY8106A) += sy8106a-regulator.o
 obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
 obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
 obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
@@ -125,5 +126,4 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
 obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
 obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
 
-
 ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c
new file mode 100644
index 000000000000..6dbe41044ab9
--- /dev/null
+++ b/drivers/regulator/sy8106a-regulator.c
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * sy8106a-regulator.c - Regulator device driver for SY8106A
+ *
+ * Copyright (C) 2016 Ondřej Jirman <megous@megous.com>
+ * Copyright (c) 2017-2018 Icenowy Zheng <icenowy@aosc.io>
+ */
+
+#include <linux/err.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/of_regulator.h>
+
+#define SY8106A_REG_VOUT1_SEL		0x01
+#define SY8106A_REG_VOUT_COM		0x02
+#define SY8106A_REG_VOUT1_SEL_MASK	0x7f
+#define SY8106A_DISABLE_REG		BIT(0)
+/*
+ * The I2C controlled voltage will only work when this bit is set; otherwise
+ * it will behave like a fixed regulator.
+ */
+#define SY8106A_GO_BIT			BIT(7)
+
+struct sy8106a {
+	struct regulator_dev *rdev;
+	struct regmap *regmap;
+	u32 fixed_voltage;
+};
+
+static const struct regmap_config sy8106a_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
+static int sy8106a_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
+{
+	/* We use our set_voltage_sel in order to avoid unnecessary I2C
+	 * chatter, because the regulator_get_voltage_sel_regmap using
+	 * apply_bit would perform 4 unnecessary transfers instead of one,
+	 * increasing the chance of error.
+	 */
+	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
+			    sel | SY8106A_GO_BIT);
+}
+
+static int sy8106a_get_voltage_sel(struct regulator_dev *rdev)
+{
+	struct sy8106a *chip = rdev_get_drvdata(rdev);
+	unsigned int reg;
+	int error;
+
+	error = regmap_read(rdev->regmap, rdev->desc->vsel_reg, &reg);
+	if (error)
+		return error;
+
+	if (reg & SY8106A_GO_BIT)
+		return reg & rdev->desc->vsel_mask;
+	else
+		return (chip->fixed_voltage - rdev->desc->min_uV) /
+		       rdev->desc->uV_step;
+}
+
+static const struct regulator_ops sy8106a_ops = {
+	.set_voltage_sel = sy8106a_set_voltage_sel,
+	.set_voltage_time_sel = regulator_set_voltage_time_sel,
+	.get_voltage_sel = sy8106a_get_voltage_sel,
+	.list_voltage = regulator_list_voltage_linear,
+	/* Enabling/disabling the regulator is not yet implemented */
+};
+
+/* Default limits measured in millivolts */
+#define SY8106A_MIN_MV		680
+#define SY8106A_MAX_MV		1950
+#define SY8106A_STEP_MV		10
+
+static const struct regulator_desc sy8106a_reg = {
+	.name = "SY8106A",
+	.id = 0,
+	.ops = &sy8106a_ops,
+	.type = REGULATOR_VOLTAGE,
+	.n_voltages = ((SY8106A_MAX_MV - SY8106A_MIN_MV) / SY8106A_STEP_MV) + 1,
+	.min_uV = (SY8106A_MIN_MV * 1000),
+	.uV_step = (SY8106A_STEP_MV * 1000),
+	.vsel_reg = SY8106A_REG_VOUT1_SEL,
+	.vsel_mask = SY8106A_REG_VOUT1_SEL_MASK,
+	/*
+	 * This ramp_delay is a conservative default value which works on
+	 * H3/H5 boards VDD-CPUX situations.
+	 */
+	.ramp_delay = 200,
+	.owner = THIS_MODULE,
+};
+
+/*
+ * I2C driver interface functions
+ */
+static int sy8106a_i2c_probe(struct i2c_client *i2c,
+			    const struct i2c_device_id *id)
+{
+	struct sy8106a *chip;
+	struct device *dev = &i2c->dev;
+	struct regulator_dev *rdev = NULL;
+	struct regulator_config config = { };
+	int error;
+
+	chip = devm_kzalloc(&i2c->dev, sizeof(struct sy8106a), GFP_KERNEL);
+	if (!chip)
+		return -ENOMEM;
+
+	error = of_property_read_u32(dev->of_node, "silergy,fixed-microvolt",
+				     &chip->fixed_voltage);
+	if (error)
+		return error;
+
+	chip->regmap = devm_regmap_init_i2c(i2c, &sy8106a_regmap_config);
+	if (IS_ERR(chip->regmap)) {
+		error = PTR_ERR(chip->regmap);
+		dev_err(dev, "Failed to allocate register map: %d\n", error);
+		return error;
+	}
+
+	config.dev = &i2c->dev;
+	config.regmap = chip->regmap;
+	config.driver_data = chip;
+
+	config.of_node = dev->of_node;
+	config.init_data = of_get_regulator_init_data(dev, dev->of_node,
+						      &sy8106a_reg);
+
+	if (!config.init_data)
+		return -ENOMEM;
+
+	/* Probe regulator */
+	rdev = devm_regulator_register(&i2c->dev, &sy8106a_reg, &config);
+	if (IS_ERR(rdev)) {
+		error = PTR_ERR(rdev);
+		dev_err(&i2c->dev, "Failed to register SY8106A regulator: %d\n", error);
+		return error;
+	}
+
+	chip->rdev = rdev;
+
+	i2c_set_clientdata(i2c, chip);
+
+	return 0;
+}
+
+static const struct of_device_id sy8106a_i2c_of_match[] = {
+	{ .compatible = "silergy,sy8106a" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match);
+
+static const struct i2c_device_id sy8106a_i2c_id[] = {
+	{ "sy8106a", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);
+
+static struct i2c_driver sy8106a_regulator_driver = {
+	.driver = {
+		.name = "sy8106a",
+		.of_match_table	= of_match_ptr(sy8106a_i2c_of_match),
+	},
+	.probe = sy8106a_i2c_probe,
+	.id_table = sy8106a_i2c_id,
+};
+
+module_i2c_driver(sy8106a_regulator_driver);
+
+MODULE_AUTHOR("Ondřej Jirman <megous@megous.com>");
+MODULE_AUTHOR("Icenowy Zheng <icenowy@aosc.io>");
+MODULE_DESCRIPTION("Regulator device driver for Silergy SY8106A");
+MODULE_LICENSE("GPL");
-- 
2.15.1

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

SY8106A is an I2C attached single output regulator made by Silergy Corp,
which is used on several Allwinner H3/H5 SBCs to control the power
supply of the ARM cores.

Add a driver for it.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: Change commit message, remove enable/disable code, add default
 ramp_delay, add comment for go bit, add code for fixed mode voltage]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
---
Changes in v3:
- Return the fixed voltage defined in device tree when I2C regulating
  not enabled (in this situation the register may contain no valid
  voltage data).

Changes in v2:
- Dropped the enable/disable code.
- Added default ramp_delay value.
- Added comment for the "go bit".

 MAINTAINERS                           |   6 ++
 drivers/regulator/Kconfig             |   7 ++
 drivers/regulator/Makefile            |   2 +-
 drivers/regulator/sy8106a-regulator.c | 175 ++++++++++++++++++++++++++++++++++
 4 files changed, 189 insertions(+), 1 deletion(-)
 create mode 100644 drivers/regulator/sy8106a-regulator.c

diff --git a/MAINTAINERS b/MAINTAINERS
index a33643739820..e0cb78568458 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13464,6 +13464,12 @@ S:	Supported
 F:	net/switchdev/
 F:	include/net/switchdev.h
 
+SY8106A REGULATOR DRIVER
+M:	Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
+S:	Maintained
+F:	drivers/regulator/sy8106a-regulator.c
+F:	Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
+
 SYNC FILE FRAMEWORK
 M:	Sumit Semwal <sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
 R:	Gustavo Padovan <gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org>
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 097f61784a7d..4efae3b7e746 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -801,6 +801,13 @@ config REGULATOR_STW481X_VMMC
 	  This driver supports the internal VMMC regulator in the STw481x
 	  PMIC chips.
 
+config REGULATOR_SY8106A
+	tristate "Silergy SY8106A regulator"
+	depends on I2C && (OF || COMPILE_TEST)
+	select REGMAP_I2C
+	help
+	  This driver supports SY8106A single output regulator.
+
 config REGULATOR_TPS51632
 	tristate "TI TPS51632 Power Regulator"
 	depends on I2C
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 590674fbecd7..d81fb02bd6e9 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -100,6 +100,7 @@ obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
 obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
 obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
 obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
+obj-$(CONFIG_REGULATOR_SY8106A) += sy8106a-regulator.o
 obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
 obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
 obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
@@ -125,5 +126,4 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
 obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
 obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
 
-
 ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c
new file mode 100644
index 000000000000..6dbe41044ab9
--- /dev/null
+++ b/drivers/regulator/sy8106a-regulator.c
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * sy8106a-regulator.c - Regulator device driver for SY8106A
+ *
+ * Copyright (C) 2016 Ondřej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
+ * Copyright (c) 2017-2018 Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
+ */
+
+#include <linux/err.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/of_regulator.h>
+
+#define SY8106A_REG_VOUT1_SEL		0x01
+#define SY8106A_REG_VOUT_COM		0x02
+#define SY8106A_REG_VOUT1_SEL_MASK	0x7f
+#define SY8106A_DISABLE_REG		BIT(0)
+/*
+ * The I2C controlled voltage will only work when this bit is set; otherwise
+ * it will behave like a fixed regulator.
+ */
+#define SY8106A_GO_BIT			BIT(7)
+
+struct sy8106a {
+	struct regulator_dev *rdev;
+	struct regmap *regmap;
+	u32 fixed_voltage;
+};
+
+static const struct regmap_config sy8106a_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
+static int sy8106a_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
+{
+	/* We use our set_voltage_sel in order to avoid unnecessary I2C
+	 * chatter, because the regulator_get_voltage_sel_regmap using
+	 * apply_bit would perform 4 unnecessary transfers instead of one,
+	 * increasing the chance of error.
+	 */
+	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
+			    sel | SY8106A_GO_BIT);
+}
+
+static int sy8106a_get_voltage_sel(struct regulator_dev *rdev)
+{
+	struct sy8106a *chip = rdev_get_drvdata(rdev);
+	unsigned int reg;
+	int error;
+
+	error = regmap_read(rdev->regmap, rdev->desc->vsel_reg, &reg);
+	if (error)
+		return error;
+
+	if (reg & SY8106A_GO_BIT)
+		return reg & rdev->desc->vsel_mask;
+	else
+		return (chip->fixed_voltage - rdev->desc->min_uV) /
+		       rdev->desc->uV_step;
+}
+
+static const struct regulator_ops sy8106a_ops = {
+	.set_voltage_sel = sy8106a_set_voltage_sel,
+	.set_voltage_time_sel = regulator_set_voltage_time_sel,
+	.get_voltage_sel = sy8106a_get_voltage_sel,
+	.list_voltage = regulator_list_voltage_linear,
+	/* Enabling/disabling the regulator is not yet implemented */
+};
+
+/* Default limits measured in millivolts */
+#define SY8106A_MIN_MV		680
+#define SY8106A_MAX_MV		1950
+#define SY8106A_STEP_MV		10
+
+static const struct regulator_desc sy8106a_reg = {
+	.name = "SY8106A",
+	.id = 0,
+	.ops = &sy8106a_ops,
+	.type = REGULATOR_VOLTAGE,
+	.n_voltages = ((SY8106A_MAX_MV - SY8106A_MIN_MV) / SY8106A_STEP_MV) + 1,
+	.min_uV = (SY8106A_MIN_MV * 1000),
+	.uV_step = (SY8106A_STEP_MV * 1000),
+	.vsel_reg = SY8106A_REG_VOUT1_SEL,
+	.vsel_mask = SY8106A_REG_VOUT1_SEL_MASK,
+	/*
+	 * This ramp_delay is a conservative default value which works on
+	 * H3/H5 boards VDD-CPUX situations.
+	 */
+	.ramp_delay = 200,
+	.owner = THIS_MODULE,
+};
+
+/*
+ * I2C driver interface functions
+ */
+static int sy8106a_i2c_probe(struct i2c_client *i2c,
+			    const struct i2c_device_id *id)
+{
+	struct sy8106a *chip;
+	struct device *dev = &i2c->dev;
+	struct regulator_dev *rdev = NULL;
+	struct regulator_config config = { };
+	int error;
+
+	chip = devm_kzalloc(&i2c->dev, sizeof(struct sy8106a), GFP_KERNEL);
+	if (!chip)
+		return -ENOMEM;
+
+	error = of_property_read_u32(dev->of_node, "silergy,fixed-microvolt",
+				     &chip->fixed_voltage);
+	if (error)
+		return error;
+
+	chip->regmap = devm_regmap_init_i2c(i2c, &sy8106a_regmap_config);
+	if (IS_ERR(chip->regmap)) {
+		error = PTR_ERR(chip->regmap);
+		dev_err(dev, "Failed to allocate register map: %d\n", error);
+		return error;
+	}
+
+	config.dev = &i2c->dev;
+	config.regmap = chip->regmap;
+	config.driver_data = chip;
+
+	config.of_node = dev->of_node;
+	config.init_data = of_get_regulator_init_data(dev, dev->of_node,
+						      &sy8106a_reg);
+
+	if (!config.init_data)
+		return -ENOMEM;
+
+	/* Probe regulator */
+	rdev = devm_regulator_register(&i2c->dev, &sy8106a_reg, &config);
+	if (IS_ERR(rdev)) {
+		error = PTR_ERR(rdev);
+		dev_err(&i2c->dev, "Failed to register SY8106A regulator: %d\n", error);
+		return error;
+	}
+
+	chip->rdev = rdev;
+
+	i2c_set_clientdata(i2c, chip);
+
+	return 0;
+}
+
+static const struct of_device_id sy8106a_i2c_of_match[] = {
+	{ .compatible = "silergy,sy8106a" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match);
+
+static const struct i2c_device_id sy8106a_i2c_id[] = {
+	{ "sy8106a", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);
+
+static struct i2c_driver sy8106a_regulator_driver = {
+	.driver = {
+		.name = "sy8106a",
+		.of_match_table	= of_match_ptr(sy8106a_i2c_of_match),
+	},
+	.probe = sy8106a_i2c_probe,
+	.id_table = sy8106a_i2c_id,
+};
+
+module_i2c_driver(sy8106a_regulator_driver);
+
+MODULE_AUTHOR("Ondřej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>");
+MODULE_AUTHOR("Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>");
+MODULE_DESCRIPTION("Regulator device driver for Silergy SY8106A");
+MODULE_LICENSE("GPL");
-- 
2.15.1

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ondrej Jirman <megous@megous.com>

SY8106A is an I2C attached single output regulator made by Silergy Corp,
which is used on several Allwinner H3/H5 SBCs to control the power
supply of the ARM cores.

Add a driver for it.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message, remove enable/disable code, add default
 ramp_delay, add comment for go bit, add code for fixed mode voltage]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
---
Changes in v3:
- Return the fixed voltage defined in device tree when I2C regulating
  not enabled (in this situation the register may contain no valid
  voltage data).

Changes in v2:
- Dropped the enable/disable code.
- Added default ramp_delay value.
- Added comment for the "go bit".

 MAINTAINERS                           |   6 ++
 drivers/regulator/Kconfig             |   7 ++
 drivers/regulator/Makefile            |   2 +-
 drivers/regulator/sy8106a-regulator.c | 175 ++++++++++++++++++++++++++++++++++
 4 files changed, 189 insertions(+), 1 deletion(-)
 create mode 100644 drivers/regulator/sy8106a-regulator.c

diff --git a/MAINTAINERS b/MAINTAINERS
index a33643739820..e0cb78568458 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13464,6 +13464,12 @@ S:	Supported
 F:	net/switchdev/
 F:	include/net/switchdev.h
 
+SY8106A REGULATOR DRIVER
+M:	Icenowy Zheng <icenowy@aosc.io>
+S:	Maintained
+F:	drivers/regulator/sy8106a-regulator.c
+F:	Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
+
 SYNC FILE FRAMEWORK
 M:	Sumit Semwal <sumit.semwal@linaro.org>
 R:	Gustavo Padovan <gustavo@padovan.org>
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 097f61784a7d..4efae3b7e746 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -801,6 +801,13 @@ config REGULATOR_STW481X_VMMC
 	  This driver supports the internal VMMC regulator in the STw481x
 	  PMIC chips.
 
+config REGULATOR_SY8106A
+	tristate "Silergy SY8106A regulator"
+	depends on I2C && (OF || COMPILE_TEST)
+	select REGMAP_I2C
+	help
+	  This driver supports SY8106A single output regulator.
+
 config REGULATOR_TPS51632
 	tristate "TI TPS51632 Power Regulator"
 	depends on I2C
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 590674fbecd7..d81fb02bd6e9 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -100,6 +100,7 @@ obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
 obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
 obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
 obj-$(CONFIG_REGULATOR_STW481X_VMMC) += stw481x-vmmc.o
+obj-$(CONFIG_REGULATOR_SY8106A) += sy8106a-regulator.o
 obj-$(CONFIG_REGULATOR_TI_ABB) += ti-abb-regulator.o
 obj-$(CONFIG_REGULATOR_TPS6105X) += tps6105x-regulator.o
 obj-$(CONFIG_REGULATOR_TPS62360) += tps62360-regulator.o
@@ -125,5 +126,4 @@ obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
 obj-$(CONFIG_REGULATOR_WM8400) += wm8400-regulator.o
 obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
 
-
 ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c
new file mode 100644
index 000000000000..6dbe41044ab9
--- /dev/null
+++ b/drivers/regulator/sy8106a-regulator.c
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * sy8106a-regulator.c - Regulator device driver for SY8106A
+ *
+ * Copyright (C) 2016 Ond?ej Jirman <megous@megous.com>
+ * Copyright (c) 2017-2018 Icenowy Zheng <icenowy@aosc.io>
+ */
+
+#include <linux/err.h>
+#include <linux/i2c.h>
+#include <linux/module.h>
+#include <linux/regmap.h>
+#include <linux/regulator/driver.h>
+#include <linux/regulator/of_regulator.h>
+
+#define SY8106A_REG_VOUT1_SEL		0x01
+#define SY8106A_REG_VOUT_COM		0x02
+#define SY8106A_REG_VOUT1_SEL_MASK	0x7f
+#define SY8106A_DISABLE_REG		BIT(0)
+/*
+ * The I2C controlled voltage will only work when this bit is set; otherwise
+ * it will behave like a fixed regulator.
+ */
+#define SY8106A_GO_BIT			BIT(7)
+
+struct sy8106a {
+	struct regulator_dev *rdev;
+	struct regmap *regmap;
+	u32 fixed_voltage;
+};
+
+static const struct regmap_config sy8106a_regmap_config = {
+	.reg_bits = 8,
+	.val_bits = 8,
+};
+
+static int sy8106a_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
+{
+	/* We use our set_voltage_sel in order to avoid unnecessary I2C
+	 * chatter, because the regulator_get_voltage_sel_regmap using
+	 * apply_bit would perform 4 unnecessary transfers instead of one,
+	 * increasing the chance of error.
+	 */
+	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
+			    sel | SY8106A_GO_BIT);
+}
+
+static int sy8106a_get_voltage_sel(struct regulator_dev *rdev)
+{
+	struct sy8106a *chip = rdev_get_drvdata(rdev);
+	unsigned int reg;
+	int error;
+
+	error = regmap_read(rdev->regmap, rdev->desc->vsel_reg, &reg);
+	if (error)
+		return error;
+
+	if (reg & SY8106A_GO_BIT)
+		return reg & rdev->desc->vsel_mask;
+	else
+		return (chip->fixed_voltage - rdev->desc->min_uV) /
+		       rdev->desc->uV_step;
+}
+
+static const struct regulator_ops sy8106a_ops = {
+	.set_voltage_sel = sy8106a_set_voltage_sel,
+	.set_voltage_time_sel = regulator_set_voltage_time_sel,
+	.get_voltage_sel = sy8106a_get_voltage_sel,
+	.list_voltage = regulator_list_voltage_linear,
+	/* Enabling/disabling the regulator is not yet implemented */
+};
+
+/* Default limits measured in millivolts */
+#define SY8106A_MIN_MV		680
+#define SY8106A_MAX_MV		1950
+#define SY8106A_STEP_MV		10
+
+static const struct regulator_desc sy8106a_reg = {
+	.name = "SY8106A",
+	.id = 0,
+	.ops = &sy8106a_ops,
+	.type = REGULATOR_VOLTAGE,
+	.n_voltages = ((SY8106A_MAX_MV - SY8106A_MIN_MV) / SY8106A_STEP_MV) + 1,
+	.min_uV = (SY8106A_MIN_MV * 1000),
+	.uV_step = (SY8106A_STEP_MV * 1000),
+	.vsel_reg = SY8106A_REG_VOUT1_SEL,
+	.vsel_mask = SY8106A_REG_VOUT1_SEL_MASK,
+	/*
+	 * This ramp_delay is a conservative default value which works on
+	 * H3/H5 boards VDD-CPUX situations.
+	 */
+	.ramp_delay = 200,
+	.owner = THIS_MODULE,
+};
+
+/*
+ * I2C driver interface functions
+ */
+static int sy8106a_i2c_probe(struct i2c_client *i2c,
+			    const struct i2c_device_id *id)
+{
+	struct sy8106a *chip;
+	struct device *dev = &i2c->dev;
+	struct regulator_dev *rdev = NULL;
+	struct regulator_config config = { };
+	int error;
+
+	chip = devm_kzalloc(&i2c->dev, sizeof(struct sy8106a), GFP_KERNEL);
+	if (!chip)
+		return -ENOMEM;
+
+	error = of_property_read_u32(dev->of_node, "silergy,fixed-microvolt",
+				     &chip->fixed_voltage);
+	if (error)
+		return error;
+
+	chip->regmap = devm_regmap_init_i2c(i2c, &sy8106a_regmap_config);
+	if (IS_ERR(chip->regmap)) {
+		error = PTR_ERR(chip->regmap);
+		dev_err(dev, "Failed to allocate register map: %d\n", error);
+		return error;
+	}
+
+	config.dev = &i2c->dev;
+	config.regmap = chip->regmap;
+	config.driver_data = chip;
+
+	config.of_node = dev->of_node;
+	config.init_data = of_get_regulator_init_data(dev, dev->of_node,
+						      &sy8106a_reg);
+
+	if (!config.init_data)
+		return -ENOMEM;
+
+	/* Probe regulator */
+	rdev = devm_regulator_register(&i2c->dev, &sy8106a_reg, &config);
+	if (IS_ERR(rdev)) {
+		error = PTR_ERR(rdev);
+		dev_err(&i2c->dev, "Failed to register SY8106A regulator: %d\n", error);
+		return error;
+	}
+
+	chip->rdev = rdev;
+
+	i2c_set_clientdata(i2c, chip);
+
+	return 0;
+}
+
+static const struct of_device_id sy8106a_i2c_of_match[] = {
+	{ .compatible = "silergy,sy8106a" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match);
+
+static const struct i2c_device_id sy8106a_i2c_id[] = {
+	{ "sy8106a", 0 },
+	{ },
+};
+MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id);
+
+static struct i2c_driver sy8106a_regulator_driver = {
+	.driver = {
+		.name = "sy8106a",
+		.of_match_table	= of_match_ptr(sy8106a_i2c_of_match),
+	},
+	.probe = sy8106a_i2c_probe,
+	.id_table = sy8106a_i2c_id,
+};
+
+module_i2c_driver(sy8106a_regulator_driver);
+
+MODULE_AUTHOR("Ond?ej Jirman <megous@megous.com>");
+MODULE_AUTHOR("Icenowy Zheng <icenowy@aosc.io>");
+MODULE_DESCRIPTION("Regulator device driver for Silergy SY8106A");
+MODULE_LICENSE("GPL");
-- 
2.15.1

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

* [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous@megous.com>

Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
Orange Pi PC, then set the power supply of the ARM cores to this
regulator, in order to enable DVFS.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Enable DVFS in this patch, slight changes and change commit
 message]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
[wens@csie.org: Rename regulator label]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
Changes in v3:
- Renamed regulator label (by Chen-Yu Tsai).
- Added the fixed mode voltage number.

Changes in v2:
- Reduce maximum voltage to 1.3V.
- Slightly changed the comment at 1.0V minimum voltage for taking BSP
  DVFS table instead of Armbian one.

 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
index cea4d647ecbf..46240334128f 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -113,6 +113,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_vdd_cpux>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -182,6 +186,30 @@
 	};
 };
 
+&r_i2c {
+	status = "okay";
+
+	reg_vdd_cpux: regulator@65 {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "vdd-cpux";
+		silergy,fixed-microvolt = <1200000>;
+		/*
+		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+		 * however both the Armbian DVFS table and the official one
+		 * have operating points with voltage under 1.1V, and both
+		 * DVFS table are known to work properly at the lowest
+		 * operating point.
+		 *
+		 * Use 1.0V as the minimum voltage instead.
+		 */
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &r_pio {
 	leds_r_opc: led_pins {
 		pins = "PL10";
-- 
2.15.1

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

* [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman, Icenowy Zheng

From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>

Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
Orange Pi PC, then set the power supply of the ARM cores to this
regulator, in order to enable DVFS.

Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
[Icenowy: Enable DVFS in this patch, slight changes and change commit
 message]
Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
[wens-jdAy2FN1RRM@public.gmane.org: Rename regulator label]
Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
---
Changes in v3:
- Renamed regulator label (by Chen-Yu Tsai).
- Added the fixed mode voltage number.

Changes in v2:
- Reduce maximum voltage to 1.3V.
- Slightly changed the comment at 1.0V minimum voltage for taking BSP
  DVFS table instead of Armbian one.

 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
index cea4d647ecbf..46240334128f 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -113,6 +113,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_vdd_cpux>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -182,6 +186,30 @@
 	};
 };
 
+&r_i2c {
+	status = "okay";
+
+	reg_vdd_cpux: regulator@65 {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "vdd-cpux";
+		silergy,fixed-microvolt = <1200000>;
+		/*
+		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+		 * however both the Armbian DVFS table and the official one
+		 * have operating points with voltage under 1.1V, and both
+		 * DVFS table are known to work properly at the lowest
+		 * operating point.
+		 *
+		 * Use 1.0V as the minimum voltage instead.
+		 */
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &r_pio {
 	leds_r_opc: led_pins {
 		pins = "PL10";
-- 
2.15.1

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

* [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 14:46   ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ondrej Jirman <megous@megous.com>

Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
Orange Pi PC, then set the power supply of the ARM cores to this
regulator, in order to enable DVFS.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Enable DVFS in this patch, slight changes and change commit
 message]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
[wens at csie.org: Rename regulator label]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
Changes in v3:
- Renamed regulator label (by Chen-Yu Tsai).
- Added the fixed mode voltage number.

Changes in v2:
- Reduce maximum voltage to 1.3V.
- Slightly changed the comment at 1.0V minimum voltage for taking BSP
  DVFS table instead of Armbian one.

 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
index cea4d647ecbf..46240334128f 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -113,6 +113,10 @@
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_vdd_cpux>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -182,6 +186,30 @@
 	};
 };
 
+&r_i2c {
+	status = "okay";
+
+	reg_vdd_cpux: regulator at 65 {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "vdd-cpux";
+		silergy,fixed-microvolt = <1200000>;
+		/*
+		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+		 * however both the Armbian DVFS table and the official one
+		 * have operating points with voltage under 1.1V, and both
+		 * DVFS table are known to work properly at the lowest
+		 * operating point.
+		 *
+		 * Use 1.0V as the minimum voltage instead.
+		 */
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &r_pio {
 	leds_r_opc: led_pins {
 		pins = "PL10";
-- 
2.15.1

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

* Re: [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 15:03     ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2018-04-23 15:03 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Chen-Yu Tsai,
	linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman

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

On Mon, Apr 23, 2018 at 10:46:57PM +0800, Icenowy Zheng wrote:
> From: Ondrej Jirman <megous@megous.com>
> 
> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
> Orange Pi PC, then set the power supply of the ARM cores to this
> regulator, in order to enable DVFS.
> 
> Signed-off-by: Ondrej Jirman <megous@megous.com>
> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>  message]
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>
> [wens@csie.org: Rename regulator label]
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Why is there Chen-Yu's SoB? It doesn't really make much sense, unless
Chen-Yu would have applied this patch already, but then you wouldn't
post it, right?

Maxime 

> ---

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

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

* Re: [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 15:03     ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2018-04-23 15:03 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Chen-Yu Tsai,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman

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

On Mon, Apr 23, 2018 at 10:46:57PM +0800, Icenowy Zheng wrote:
> From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
> 
> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
> Orange Pi PC, then set the power supply of the ARM cores to this
> regulator, in order to enable DVFS.
> 
> Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>  message]
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
> Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> [wens-jdAy2FN1RRM@public.gmane.org: Rename regulator label]
> Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

Why is there Chen-Yu's SoB? It doesn't really make much sense, unless
Chen-Yu would have applied this patch already, but then you wouldn't
post it, right?

Maxime 

> ---

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 15:03     ` Maxime Ripard
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Ripard @ 2018-04-23 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 23, 2018 at 10:46:57PM +0800, Icenowy Zheng wrote:
> From: Ondrej Jirman <megous@megous.com>
> 
> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
> Orange Pi PC, then set the power supply of the ARM cores to this
> regulator, in order to enable DVFS.
> 
> Signed-off-by: Ondrej Jirman <megous@megous.com>
> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>  message]
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Reviewed-by: Chen-Yu Tsai <wens@csie.org>
> [wens at csie.org: Rename regulator label]
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Why is there Chen-Yu's SoB? It doesn't really make much sense, unless
Chen-Yu would have applied this patch already, but then you wouldn't
post it, right?

Maxime 

> ---

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180423/8a982140/attachment.sig>

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

* Re: [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
  2018-04-23 15:03     ` Maxime Ripard
  (?)
@ 2018-04-23 15:04       ` Icenowy Zheng
  -1 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 15:04 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Chen-Yu Tsai,
	linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman



于 2018年4月23日 GMT+08:00 下午11:03:09, Maxime Ripard <maxime.ripard@bootlin.com> 写到:
>On Mon, Apr 23, 2018 at 10:46:57PM +0800, Icenowy Zheng wrote:
>> From: Ondrej Jirman <megous@megous.com>
>> 
>> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
>> Orange Pi PC, then set the power supply of the ARM cores to this
>> regulator, in order to enable DVFS.
>> 
>> Signed-off-by: Ondrej Jirman <megous@megous.com>
>> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>>  message]
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> Reviewed-by: Chen-Yu Tsai <wens@csie.org>
>> [wens@csie.org: Rename regulator label]
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>
>Why is there Chen-Yu's SoB? It doesn't really make much sense, unless
>Chen-Yu would have applied this patch already, but then you wouldn't
>post it, right?

This is taken from sunxi/h3-h5-for-4.18 branch, which has
label name change from wens, and then added microvolt property.

So his SoB is from when he apply it for the first time.

>
>Maxime 
>
>> ---

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

* Re: [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 15:04       ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 15:04 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Chen-Yu Tsai,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Ondrej Jirman



于 2018年4月23日 GMT+08:00 下午11:03:09, Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> 写到:
>On Mon, Apr 23, 2018 at 10:46:57PM +0800, Icenowy Zheng wrote:
>> From: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
>> 
>> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
>> Orange Pi PC, then set the power supply of the ARM cores to this
>> regulator, in order to enable DVFS.
>> 
>> Signed-off-by: Ondrej Jirman <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
>> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>>  message]
>> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
>> Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
>> [wens-jdAy2FN1RRM@public.gmane.org: Rename regulator label]
>> Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
>
>Why is there Chen-Yu's SoB? It doesn't really make much sense, unless
>Chen-Yu would have applied this patch already, but then you wouldn't
>post it, right?

This is taken from sunxi/h3-h5-for-4.18 branch, which has
label name change from wens, and then added microvolt property.

So his SoB is from when he apply it for the first time.

>
>Maxime 
>
>> ---

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC
@ 2018-04-23 15:04       ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-23 15:04 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018?4?23? GMT+08:00 ??11:03:09, Maxime Ripard <maxime.ripard@bootlin.com> ??:
>On Mon, Apr 23, 2018 at 10:46:57PM +0800, Icenowy Zheng wrote:
>> From: Ondrej Jirman <megous@megous.com>
>> 
>> Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on
>> Orange Pi PC, then set the power supply of the ARM cores to this
>> regulator, in order to enable DVFS.
>> 
>> Signed-off-by: Ondrej Jirman <megous@megous.com>
>> [Icenowy: Enable DVFS in this patch, slight changes and change commit
>>  message]
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> Reviewed-by: Chen-Yu Tsai <wens@csie.org>
>> [wens at csie.org: Rename regulator label]
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>
>Why is there Chen-Yu's SoB? It doesn't really make much sense, unless
>Chen-Yu would have applied this patch already, but then you wouldn't
>post it, right?

This is taken from sunxi/h3-h5-for-4.18 branch, which has
label name change from wens, and then added microvolt property.

So his SoB is from when he apply it for the first time.

>
>Maxime 
>
>> ---

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
  2018-04-23 14:46   ` Icenowy Zheng
@ 2018-04-24 17:07     ` Mark Brown
  -1 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-04-24 17:07 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Liam Girdwood, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
	linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Ondrej Jirman

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

On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:

> --- /dev/null
> +++ b/drivers/regulator/sy8106a-regulator.c
> @@ -0,0 +1,176 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * sy8106a-regulator.c - Regulator device driver for SY8106A

Just make the entire thing a C++ comment so it looks consistent and
joined up.

> +static int sy8106a_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
> +{
> +	/* We use our set_voltage_sel in order to avoid unnecessary I2C
> +	 * chatter, because the regulator_get_voltage_sel_regmap using
> +	 * apply_bit would perform 4 unnecessary transfers instead of one,
> +	 * increasing the chance of error.
> +	 */
> +	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
> +			    sel | SY8106A_GO_BIT);

Why would it do these extra transfers?  Is this just the fact that you
didn't set up a register cache (though the r/m/w cycle should only add
the read)?  We could put some logic in the core regmap code to detect
that an _update_bits() call is going to write to the whole register,
though it'd be even easier to just let this register be cached.

Generally if we can usefully optimize things we should do it at the
framework level.

> +	if (reg & SY8106A_GO_BIT)
> +		return reg & rdev->desc->vsel_mask;
> +	else
> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
> +		       rdev->desc->uV_step;

You could use the standard get_voltage_sel() if you provide a mapping
operation that set everything with _GO_BIT set to return the fixed
voltage.  Though looking at this it seems that the fixed voltage will
always be one that could be set via the register anyway so I'm wondering
if the easiest thing here isn't to just have the driver turn off _GO_BIT
during probe() and not worry about the special case at runtime.

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

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-24 17:07     ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-04-24 17:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:

> --- /dev/null
> +++ b/drivers/regulator/sy8106a-regulator.c
> @@ -0,0 +1,176 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * sy8106a-regulator.c - Regulator device driver for SY8106A

Just make the entire thing a C++ comment so it looks consistent and
joined up.

> +static int sy8106a_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
> +{
> +	/* We use our set_voltage_sel in order to avoid unnecessary I2C
> +	 * chatter, because the regulator_get_voltage_sel_regmap using
> +	 * apply_bit would perform 4 unnecessary transfers instead of one,
> +	 * increasing the chance of error.
> +	 */
> +	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
> +			    sel | SY8106A_GO_BIT);

Why would it do these extra transfers?  Is this just the fact that you
didn't set up a register cache (though the r/m/w cycle should only add
the read)?  We could put some logic in the core regmap code to detect
that an _update_bits() call is going to write to the whole register,
though it'd be even easier to just let this register be cached.

Generally if we can usefully optimize things we should do it at the
framework level.

> +	if (reg & SY8106A_GO_BIT)
> +		return reg & rdev->desc->vsel_mask;
> +	else
> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
> +		       rdev->desc->uV_step;

You could use the standard get_voltage_sel() if you provide a mapping
operation that set everything with _GO_BIT set to return the fixed
voltage.  Though looking at this it seems that the fixed voltage will
always be one that could be set via the register anyway so I'm wondering
if the easiest thing here isn't to just have the driver turn off _GO_BIT
during probe() and not worry about the special case at runtime.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180424/e2fc3aec/attachment.sig>

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-24 23:41       ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-24 23:41 UTC (permalink / raw)
  To: linux-arm-kernel, Mark Brown
  Cc: Ondrej Jirman, devicetree, Maxime Ripard, linux-sunxi,
	Liam Girdwood, linux-kernel, Chen-Yu Tsai, Rob Herring



于 2018年4月25日 GMT+08:00 上午1:07:33, Mark Brown <broonie@kernel.org> 写到:
>On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> --- /dev/null
>> +++ b/drivers/regulator/sy8106a-regulator.c
>> @@ -0,0 +1,176 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>Just make the entire thing a C++ comment so it looks consistent and
>joined up.

SPDX identifier is special -- it should be in a seperated
comment block.

>
>> +static int sy8106a_set_voltage_sel(struct regulator_dev *rdev,
>unsigned int sel)
>> +{
>> +	/* We use our set_voltage_sel in order to avoid unnecessary I2C
>> +	 * chatter, because the regulator_get_voltage_sel_regmap using
>> +	 * apply_bit would perform 4 unnecessary transfers instead of one,
>> +	 * increasing the chance of error.
>> +	 */
>> +	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
>> +			    sel | SY8106A_GO_BIT);
>
>Why would it do these extra transfers?  Is this just the fact that you
>didn't set up a register cache (though the r/m/w cycle should only add
>the read)?  We could put some logic in the core regmap code to detect
>that an _update_bits() call is going to write to the whole register,
>though it'd be even easier to just let this register be cached.
>
>Generally if we can usefully optimize things we should do it at the
>framework level.

Oh maybe the comment needs to be changed, but it's
needed to enable it to change voltage, as it might be
not enabled at boot.

>
>> +	if (reg & SY8106A_GO_BIT)
>> +		return reg & rdev->desc->vsel_mask;
>> +	else
>> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> +		       rdev->desc->uV_step;
>
>You could use the standard get_voltage_sel() if you provide a mapping
>operation that set everything with _GO_BIT set to return the fixed
>voltage.  Though looking at this it seems that the fixed voltage will
>always be one that could be set via the register anyway so I'm
>wondering
>if the easiest thing here isn't to just have the driver turn off
>_GO_BIT

Do you mean "turn on" here?

>during probe() and not worry about the special case at runtime.

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-24 23:41       ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-24 23:41 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown
  Cc: Ondrej Jirman, devicetree-u79uwXL29TY76Z2rM5mHXA, Maxime Ripard,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Liam Girdwood,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chen-Yu Tsai, Rob Herring



于 2018年4月25日 GMT+08:00 上午1:07:33, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 写到:
>On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> --- /dev/null
>> +++ b/drivers/regulator/sy8106a-regulator.c
>> @@ -0,0 +1,176 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>Just make the entire thing a C++ comment so it looks consistent and
>joined up.

SPDX identifier is special -- it should be in a seperated
comment block.

>
>> +static int sy8106a_set_voltage_sel(struct regulator_dev *rdev,
>unsigned int sel)
>> +{
>> +	/* We use our set_voltage_sel in order to avoid unnecessary I2C
>> +	 * chatter, because the regulator_get_voltage_sel_regmap using
>> +	 * apply_bit would perform 4 unnecessary transfers instead of one,
>> +	 * increasing the chance of error.
>> +	 */
>> +	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
>> +			    sel | SY8106A_GO_BIT);
>
>Why would it do these extra transfers?  Is this just the fact that you
>didn't set up a register cache (though the r/m/w cycle should only add
>the read)?  We could put some logic in the core regmap code to detect
>that an _update_bits() call is going to write to the whole register,
>though it'd be even easier to just let this register be cached.
>
>Generally if we can usefully optimize things we should do it at the
>framework level.

Oh maybe the comment needs to be changed, but it's
needed to enable it to change voltage, as it might be
not enabled at boot.

>
>> +	if (reg & SY8106A_GO_BIT)
>> +		return reg & rdev->desc->vsel_mask;
>> +	else
>> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> +		       rdev->desc->uV_step;
>
>You could use the standard get_voltage_sel() if you provide a mapping
>operation that set everything with _GO_BIT set to return the fixed
>voltage.  Though looking at this it seems that the fixed voltage will
>always be one that could be set via the register anyway so I'm
>wondering
>if the easiest thing here isn't to just have the driver turn off
>_GO_BIT

Do you mean "turn on" here?

>during probe() and not worry about the special case at runtime.

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-24 23:41       ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-24 23:41 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018?4?25? GMT+08:00 ??1:07:33, Mark Brown <broonie@kernel.org> ??:
>On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> --- /dev/null
>> +++ b/drivers/regulator/sy8106a-regulator.c
>> @@ -0,0 +1,176 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>Just make the entire thing a C++ comment so it looks consistent and
>joined up.

SPDX identifier is special -- it should be in a seperated
comment block.

>
>> +static int sy8106a_set_voltage_sel(struct regulator_dev *rdev,
>unsigned int sel)
>> +{
>> +	/* We use our set_voltage_sel in order to avoid unnecessary I2C
>> +	 * chatter, because the regulator_get_voltage_sel_regmap using
>> +	 * apply_bit would perform 4 unnecessary transfers instead of one,
>> +	 * increasing the chance of error.
>> +	 */
>> +	return regmap_write(rdev->regmap, rdev->desc->vsel_reg,
>> +			    sel | SY8106A_GO_BIT);
>
>Why would it do these extra transfers?  Is this just the fact that you
>didn't set up a register cache (though the r/m/w cycle should only add
>the read)?  We could put some logic in the core regmap code to detect
>that an _update_bits() call is going to write to the whole register,
>though it'd be even easier to just let this register be cached.
>
>Generally if we can usefully optimize things we should do it at the
>framework level.

Oh maybe the comment needs to be changed, but it's
needed to enable it to change voltage, as it might be
not enabled at boot.

>
>> +	if (reg & SY8106A_GO_BIT)
>> +		return reg & rdev->desc->vsel_mask;
>> +	else
>> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> +		       rdev->desc->uV_step;
>
>You could use the standard get_voltage_sel() if you provide a mapping
>operation that set everything with _GO_BIT set to return the fixed
>voltage.  Though looking at this it seems that the fixed voltage will
>always be one that could be set via the register anyway so I'm
>wondering
>if the easiest thing here isn't to just have the driver turn off
>_GO_BIT

Do you mean "turn on" here?

>during probe() and not worry about the special case at runtime.

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
  2018-04-24 23:41       ` Icenowy Zheng
@ 2018-04-25 10:53         ` Mark Brown
  -1 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-04-25 10:53 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: linux-arm-kernel, Ondrej Jirman, devicetree, Maxime Ripard,
	linux-sunxi, Liam Girdwood, linux-kernel, Chen-Yu Tsai,
	Rob Herring

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

On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote:
> 于 2018年4月25日 GMT+08:00 上午1:07:33, Mark Brown <broonie@kernel.org> 写到:
> >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:

> >> --- /dev/null
> >> +++ b/drivers/regulator/sy8106a-regulator.c
> >> @@ -0,0 +1,176 @@
> >> +// SPDX-License-Identifier: GPL-2.0+
> >> +/*
> >> + * sy8106a-regulator.c - Regulator device driver for SY8106A

> >Just make the entire thing a C++ comment so it looks consistent and
> >joined up.

> SPDX identifier is special -- it should be in a seperated
> comment block.

No, it just needs to be a C++ comment on the first line to ease machine
parsing.  The rest of the file doesn't matter for that.

> >> +	if (reg & SY8106A_GO_BIT)
> >> +		return reg & rdev->desc->vsel_mask;
> >> +	else
> >> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
> >> +		       rdev->desc->uV_step;

> >You could use the standard get_voltage_sel() if you provide a mapping
> >operation that set everything with _GO_BIT set to return the fixed
> >voltage.  Though looking at this it seems that the fixed voltage will
> >always be one that could be set via the register anyway so I'm
> >wondering
> >if the easiest thing here isn't to just have the driver turn off
> >_GO_BIT

> Do you mean "turn on" here?

Yes.

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

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-25 10:53         ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-04-25 10:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote:
> ? 2018?4?25? GMT+08:00 ??1:07:33, Mark Brown <broonie@kernel.org> ??:
> >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:

> >> --- /dev/null
> >> +++ b/drivers/regulator/sy8106a-regulator.c
> >> @@ -0,0 +1,176 @@
> >> +// SPDX-License-Identifier: GPL-2.0+
> >> +/*
> >> + * sy8106a-regulator.c - Regulator device driver for SY8106A

> >Just make the entire thing a C++ comment so it looks consistent and
> >joined up.

> SPDX identifier is special -- it should be in a seperated
> comment block.

No, it just needs to be a C++ comment on the first line to ease machine
parsing.  The rest of the file doesn't matter for that.

> >> +	if (reg & SY8106A_GO_BIT)
> >> +		return reg & rdev->desc->vsel_mask;
> >> +	else
> >> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
> >> +		       rdev->desc->uV_step;

> >You could use the standard get_voltage_sel() if you provide a mapping
> >operation that set everything with _GO_BIT set to return the fixed
> >voltage.  Though looking at this it seems that the fixed voltage will
> >always be one that could be set via the register anyway so I'm
> >wondering
> >if the easiest thing here isn't to just have the driver turn off
> >_GO_BIT

> Do you mean "turn on" here?

Yes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180425/bff45862/attachment.sig>

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-25 10:55           ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-25 10:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel, Ondrej Jirman, devicetree, Maxime Ripard,
	linux-sunxi, Liam Girdwood, linux-kernel, Chen-Yu Tsai,
	Rob Herring



于 2018年4月25日 GMT+08:00 下午6:53:09, Mark Brown <broonie@kernel.org> 写到:
>On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote:
>> 于 2018年4月25日 GMT+08:00 上午1:07:33, Mark Brown <broonie@kernel.org> 写到:
>> >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> >> --- /dev/null
>> >> +++ b/drivers/regulator/sy8106a-regulator.c
>> >> @@ -0,0 +1,176 @@
>> >> +// SPDX-License-Identifier: GPL-2.0+
>> >> +/*
>> >> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>> >Just make the entire thing a C++ comment so it looks consistent and
>> >joined up.
>
>> SPDX identifier is special -- it should be in a seperated
>> comment block.
>
>No, it just needs to be a C++ comment on the first line to ease machine
>parsing.  The rest of the file doesn't matter for that.

Okay. Thus I will use a seperate /* */ block for it in the
next revision, to follow the rule.

>
>> >> +	if (reg & SY8106A_GO_BIT)
>> >> +		return reg & rdev->desc->vsel_mask;
>> >> +	else
>> >> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> >> +		       rdev->desc->uV_step;
>
>> >You could use the standard get_voltage_sel() if you provide a
>mapping
>> >operation that set everything with _GO_BIT set to return the fixed
>> >voltage.  Though looking at this it seems that the fixed voltage
>will
>> >always be one that could be set via the register anyway so I'm
>> >wondering
>> >if the easiest thing here isn't to just have the driver turn off
>> >_GO_BIT
>
>> Do you mean "turn on" here?
>
>Yes.

Okay. I will do it in this way and drop custom get/set_voltage_sel.

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-25 10:55           ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-25 10:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Ondrej Jirman,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Maxime Ripard,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Liam Girdwood,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Chen-Yu Tsai, Rob Herring



于 2018年4月25日 GMT+08:00 下午6:53:09, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 写到:
>On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote:
>> 于 2018年4月25日 GMT+08:00 上午1:07:33, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 写到:
>> >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> >> --- /dev/null
>> >> +++ b/drivers/regulator/sy8106a-regulator.c
>> >> @@ -0,0 +1,176 @@
>> >> +// SPDX-License-Identifier: GPL-2.0+
>> >> +/*
>> >> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>> >Just make the entire thing a C++ comment so it looks consistent and
>> >joined up.
>
>> SPDX identifier is special -- it should be in a seperated
>> comment block.
>
>No, it just needs to be a C++ comment on the first line to ease machine
>parsing.  The rest of the file doesn't matter for that.

Okay. Thus I will use a seperate /* */ block for it in the
next revision, to follow the rule.

>
>> >> +	if (reg & SY8106A_GO_BIT)
>> >> +		return reg & rdev->desc->vsel_mask;
>> >> +	else
>> >> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> >> +		       rdev->desc->uV_step;
>
>> >You could use the standard get_voltage_sel() if you provide a
>mapping
>> >operation that set everything with _GO_BIT set to return the fixed
>> >voltage.  Though looking at this it seems that the fixed voltage
>will
>> >always be one that could be set via the register anyway so I'm
>> >wondering
>> >if the easiest thing here isn't to just have the driver turn off
>> >_GO_BIT
>
>> Do you mean "turn on" here?
>
>Yes.

Okay. I will do it in this way and drop custom get/set_voltage_sel.

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-25 10:55           ` Icenowy Zheng
  0 siblings, 0 replies; 36+ messages in thread
From: Icenowy Zheng @ 2018-04-25 10:55 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018?4?25? GMT+08:00 ??6:53:09, Mark Brown <broonie@kernel.org> ??:
>On Wed, Apr 25, 2018 at 07:41:35AM +0800, Icenowy Zheng wrote:
>> ? 2018?4?25? GMT+08:00 ??1:07:33, Mark Brown <broonie@kernel.org> ??:
>> >On Mon, Apr 23, 2018 at 10:46:56PM +0800, Icenowy Zheng wrote:
>
>> >> --- /dev/null
>> >> +++ b/drivers/regulator/sy8106a-regulator.c
>> >> @@ -0,0 +1,176 @@
>> >> +// SPDX-License-Identifier: GPL-2.0+
>> >> +/*
>> >> + * sy8106a-regulator.c - Regulator device driver for SY8106A
>
>> >Just make the entire thing a C++ comment so it looks consistent and
>> >joined up.
>
>> SPDX identifier is special -- it should be in a seperated
>> comment block.
>
>No, it just needs to be a C++ comment on the first line to ease machine
>parsing.  The rest of the file doesn't matter for that.

Okay. Thus I will use a seperate /* */ block for it in the
next revision, to follow the rule.

>
>> >> +	if (reg & SY8106A_GO_BIT)
>> >> +		return reg & rdev->desc->vsel_mask;
>> >> +	else
>> >> +		return (chip->fixed_voltage - rdev->desc->min_uV) /
>> >> +		       rdev->desc->uV_step;
>
>> >You could use the standard get_voltage_sel() if you provide a
>mapping
>> >operation that set everything with _GO_BIT set to return the fixed
>> >voltage.  Though looking at this it seems that the fixed voltage
>will
>> >always be one that could be set via the register anyway so I'm
>> >wondering
>> >if the easiest thing here isn't to just have the driver turn off
>> >_GO_BIT
>
>> Do you mean "turn on" here?
>
>Yes.

Okay. I will do it in this way and drop custom get/set_voltage_sel.

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

* Re: [PATCH v3 2/3] regulator: add support for SY8106A regulator
  2018-04-25 10:55           ` Icenowy Zheng
@ 2018-04-25 11:13             ` Mark Brown
  -1 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-04-25 11:13 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: linux-arm-kernel, Ondrej Jirman, devicetree, Maxime Ripard,
	linux-sunxi, Liam Girdwood, linux-kernel, Chen-Yu Tsai,
	Rob Herring

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

On Wed, Apr 25, 2018 at 06:55:10PM +0800, Icenowy Zheng wrote:
> 于 2018年4月25日 GMT+08:00 下午6:53:09, Mark Brown <broonie@kernel.org> 写到:

> >> SPDX identifier is special -- it should be in a seperated
> >> comment block.

> >No, it just needs to be a C++ comment on the first line to ease machine
> >parsing.  The rest of the file doesn't matter for that.

> Okay. Thus I will use a seperate /* */ block for it in the
> next revision, to follow the rule.

Just make the whole copyright block a C++ comment.  It's much easier and
even with a blank line between the SPDX line and the rest of it it'll
still look messy and odd.

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

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

* [PATCH v3 2/3] regulator: add support for SY8106A regulator
@ 2018-04-25 11:13             ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-04-25 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 25, 2018 at 06:55:10PM +0800, Icenowy Zheng wrote:
> ? 2018?4?25? GMT+08:00 ??6:53:09, Mark Brown <broonie@kernel.org> ??:

> >> SPDX identifier is special -- it should be in a seperated
> >> comment block.

> >No, it just needs to be a C++ comment on the first line to ease machine
> >parsing.  The rest of the file doesn't matter for that.

> Okay. Thus I will use a seperate /* */ block for it in the
> next revision, to follow the rule.

Just make the whole copyright block a C++ comment.  It's much easier and
even with a blank line between the SPDX line and the rest of it it'll
still look messy and odd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180425/364e308d/attachment.sig>

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

* Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree
  2018-04-23 14:46   ` Icenowy Zheng
  (?)
@ 2018-05-09  9:32     ` Mark Brown
  -1 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-05-09  9:32 UTC (permalink / raw)
  To: Ondrej Jirman
  Cc: Icenowy Zheng, Rob Herring, Mark Brown, Liam Girdwood,
	Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
	linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Icenowy Zheng, linux-kernel

The patch

   regulator: add binding for the SY8106A voltage regulator

has been applied to the regulator tree at

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

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 32aba834f2a9fe126ff5e624371113ac1defa06e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 7 May 2018 20:29:40 +0800
Subject: [PATCH] regulator: add binding for the SY8106A voltage regulator

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../bindings/regulator/sy8106a-regulator.txt  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.17.0

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

* Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree
@ 2018-05-09  9:32     ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-05-09  9:32 UTC (permalink / raw)
  To: Ondrej Jirman; +Cc: Icenowy Zheng, Rob Herring, Mark Brown, Liam Girdwood

The patch

   regulator: add binding for the SY8106A voltage regulator

has been applied to the regulator tree at

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

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 32aba834f2a9fe126ff5e624371113ac1defa06e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 7 May 2018 20:29:40 +0800
Subject: [PATCH] regulator: add binding for the SY8106A voltage regulator

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../bindings/regulator/sy8106a-regulator.txt  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.17.0

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

* Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree
@ 2018-05-09  9:32     ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-05-09  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   regulator: add binding for the SY8106A voltage regulator

has been applied to the regulator tree at

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

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 32aba834f2a9fe126ff5e624371113ac1defa06e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 7 May 2018 20:29:40 +0800
Subject: [PATCH] regulator: add binding for the SY8106A voltage regulator

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../bindings/regulator/sy8106a-regulator.txt  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.17.0

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

* Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree
  2018-04-23 14:46   ` Icenowy Zheng
  (?)
@ 2018-05-09  9:48     ` Mark Brown
  -1 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-05-09  9:48 UTC (permalink / raw)
  To: Ondrej Jirman
  Cc: Icenowy Zheng, Rob Herring, Mark Brown, Liam Girdwood,
	Mark Brown, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
	linux-kernel, devicetree, linux-arm-kernel, linux-sunxi,
	Icenowy Zheng, linux-kernel

The patch

   regulator: add binding for the SY8106A voltage regulator

has been applied to the regulator tree at

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

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 32aba834f2a9fe126ff5e624371113ac1defa06e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 7 May 2018 20:29:40 +0800
Subject: [PATCH] regulator: add binding for the SY8106A voltage regulator

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../bindings/regulator/sy8106a-regulator.txt  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.17.0

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

* Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree
@ 2018-05-09  9:48     ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-05-09  9:48 UTC (permalink / raw)
  To: Ondrej Jirman; +Cc: Icenowy Zheng, Rob Herring, Mark Brown, Liam Girdwood

The patch

   regulator: add binding for the SY8106A voltage regulator

has been applied to the regulator tree at

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

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 32aba834f2a9fe126ff5e624371113ac1defa06e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 7 May 2018 20:29:40 +0800
Subject: [PATCH] regulator: add binding for the SY8106A voltage regulator

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../bindings/regulator/sy8106a-regulator.txt  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.17.0

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

* Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree
@ 2018-05-09  9:48     ` Mark Brown
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Brown @ 2018-05-09  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

The patch

   regulator: add binding for the SY8106A voltage regulator

has been applied to the regulator tree at

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

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 32aba834f2a9fe126ff5e624371113ac1defa06e Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Mon, 7 May 2018 20:29:40 +0800
Subject: [PATCH] regulator: add binding for the SY8106A voltage regulator

SY8106A is an I2C-controlled adjustable voltage regulator made by
Silergy Corp.

Add its device tree binding.

Signed-off-by: Ondrej Jirman <megous@megous.com>
[Icenowy: Change commit message and slight fixes]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../bindings/regulator/sy8106a-regulator.txt  | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt

diff --git a/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
new file mode 100644
index 000000000000..39a8ca73f572
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
@@ -0,0 +1,23 @@
+SY8106A Voltage regulator
+
+Required properties:
+- compatible: Must be "silergy,sy8106a"
+- reg: I2C slave address - must be <0x65>
+- silergy,fixed-microvolt - the voltage when I2C regulating is disabled (set
+  by external resistor like a fixed voltage)
+
+Any property defined as part of the core regulator binding, defined in
+./regulator.txt, can also be used.
+
+Example:
+
+	sy8106a {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "sy8106a-vdd";
+		silergy,fixed-microvolt = <1200000>;
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
-- 
2.17.0

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

end of thread, other threads:[~2018-05-09  9:48 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 14:46 [PATCH v3 0/3] SY8106 regulator support and enable it on Orange Pi PC Icenowy Zheng
2018-04-23 14:46 ` Icenowy Zheng
2018-04-23 14:46 ` Icenowy Zheng
2018-04-23 14:46 ` [PATCH v3 1/3] dt-bindings: add binding for the SY8106A voltage regulator Icenowy Zheng
2018-04-23 14:46   ` Icenowy Zheng
2018-04-23 14:46   ` Icenowy Zheng
2018-05-09  9:32   ` Applied "regulator: add binding for the SY8106A voltage regulator" to the regulator tree Mark Brown
2018-05-09  9:32     ` Mark Brown
2018-05-09  9:32     ` Mark Brown
2018-05-09  9:48   ` Mark Brown
2018-05-09  9:48     ` Mark Brown
2018-05-09  9:48     ` Mark Brown
2018-04-23 14:46 ` [PATCH v3 2/3] regulator: add support for SY8106A regulator Icenowy Zheng
2018-04-23 14:46   ` Icenowy Zheng
2018-04-23 14:46   ` Icenowy Zheng
2018-04-24 17:07   ` Mark Brown
2018-04-24 17:07     ` Mark Brown
2018-04-24 23:41     ` Icenowy Zheng
2018-04-24 23:41       ` Icenowy Zheng
2018-04-24 23:41       ` Icenowy Zheng
2018-04-25 10:53       ` Mark Brown
2018-04-25 10:53         ` Mark Brown
2018-04-25 10:55         ` Icenowy Zheng
2018-04-25 10:55           ` Icenowy Zheng
2018-04-25 10:55           ` Icenowy Zheng
2018-04-25 11:13           ` Mark Brown
2018-04-25 11:13             ` Mark Brown
2018-04-23 14:46 ` [PATCH v3 3/3] ARM: dts: sun8i: h3: Add SY8106A regulator to Orange Pi PC Icenowy Zheng
2018-04-23 14:46   ` Icenowy Zheng
2018-04-23 14:46   ` Icenowy Zheng
2018-04-23 15:03   ` Maxime Ripard
2018-04-23 15:03     ` Maxime Ripard
2018-04-23 15:03     ` Maxime Ripard
2018-04-23 15:04     ` Icenowy Zheng
2018-04-23 15:04       ` Icenowy Zheng
2018-04-23 15:04       ` Icenowy Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.