Skip to contentSkip to conversation

regulator: aw37503: add regulator driver for Awinic AW37503

PATCH In review [email protected] 3 participants 5 messages Aug 21, 2023 – Aug 22, 2023

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

v5 cover regulator: aw37503: add regulator driver for Awinic AW37503

From: Alec Li <[email protected]>

Add regulator driver for the device Awinic AW37503 which is single inductor - dual output power supply device. AW37503 device is designed to support general positive/negative driven applications like TFT display panels.

v4->v5: Delete the unnecessary '|' in the awinic,aw37503.yaml. v3->v4: Correct yamllint warnings/errors.
v2->v3: Switch to use the dev_err_probe().
Keep the Kconfig and Makefile sorted.
Correct yamllint warnings/errors.
v1->v2: Remove unneeded fields and correct yamllint warnings/errors.

Alec Li (2):
regulator: aw37503: add regulator driver for Awinic AW37503
regulator: dt-bindings: Add Awinic AW37503

 .../bindings/regulator/awinic,aw37503.yaml    |  78 ++++++
 drivers/regulator/Kconfig                     |   8 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/aw37503-regulator.c         | 240 ++++++++++++++++++
 4 files changed, 327 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml
 create mode 100644 drivers/regulator/aw37503-regulator.c

base-commit: 706a741595047797872e669b3101429ab8d378ef

Signature · 1 line
2.41.0
#1 lore raw

PATCH v5 1/2 regulator: aw37503: add regulator driver for Awinic AW37503

From: Alec Li <[email protected]>

Add regulator driver for the device Awinic AW37503 which is single inductor - dual output power supply device. AW37503 device is designed to support general positive/negative driven applications like TFT display panels.

AW37503 regulator driver supports to enable/disable and set voltage on its output.

---
 drivers/regulator/Kconfig             |   8 +
 drivers/regulator/Makefile            |   1 +
 drivers/regulator/aw37503-regulator.c | 240 ++++++++++++++++++++++++++
 3 files changed, 249 insertions(+)
 create mode 100644 drivers/regulator/aw37503-regulator.c
drivers/regulator/Kconfig +8 -0
index 823f8e6e4801..62756526cfa2 100644
@@ -178,6 +178,14 @@ config REGULATOR_ATC260X
 	  ATC260x PMICs. This will enable support for all the software
 	  controllable DCDC/LDO regulators.
 
+config REGULATOR_AW37503
+	tristate "Awinic AW37503 Dual Output Power regulators"
+	depends on I2C && GPIOLIB
+	select REGMAP_I2C
+	help
+	  This driver supports AW37503 single inductor - dual output
+	  power supply specifically designed for display panels.
+
 config REGULATOR_AXP20X
 	tristate "X-POWERS AXP20X PMIC Regulators"
 	depends on MFD_AXP20X
drivers/regulator/Makefile +1 -0
index 15e0d614ff66..f0e5cf7350a4 100644
@@ -27,6 +27,7 @@ obj-$(CONFIG_REGULATOR_ARM_SCMI) += scmi-regulator.o
 obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o
 obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o
 obj-$(CONFIG_REGULATOR_ATC260X) += atc260x-regulator.o
+obj-$(CONFIG_REGULATOR_AW37503) += aw37503-regulator.o
 obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o
 obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o
 obj-$(CONFIG_REGULATOR_BD71815)	+= bd71815-regulator.o
drivers/regulator/aw37503-regulator.c new file +240 -0

240 lines not on this page · raw message

Signature · 1 line
2.41.0
#2 lore raw

PATCH v5 2/2 regulator: dt-bindings: Add Awinic AW37503

In reply to [email protected]

From: Alec Li <[email protected]>

Add aw37503 regulator device-tree binding documentation.

---
 .../bindings/regulator/awinic,aw37503.yaml    | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml new file +78 -0
new file mode 100644
index 000000000000..c92a881ed60e
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/awinic,aw37503.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic AW37503 Voltage Regulator
+
+maintainers:
+  - Alec Li <[email protected]>
+
+description:
+  The AW37503 are dual voltage regulator, designed to support positive/negative
+  supply for driving TFT-LCD panels. It support software-configurable output
+  switching and monitoring. The output voltages can be programmed via an I2C
+  compatible interface.
+
+properties:
+  compatible:
+    const: awinic,aw37503
+
+  reg:
+    maxItems: 1
+
+patternProperties:
+  "^out[pn]$":
+    type: object
+    $ref: regulator.yaml#
+    unevaluatedProperties: false
+    description:
+      Properties for single regulator.
+
+    properties:
+      enable-gpios:
+        maxItems: 1
+        description:
+          GPIO specifier to enable the GPIO control (on/off) for regulator.
+
+    required:
+      - regulator-name
+
+required:
+  - compatible
+  - reg
+  - outp
+  - outn
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        regulator@3e {
+            compatible = "awinic,aw37503";
+            reg = <0x3e>;
+
+            outp {
+                regulator-name = "outp";
+                regulator-boot-on;
+                regulator-always-on;
+                enable-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+            };
+
+            outn {
+                regulator-name = "outn";
+                regulator-boot-on;
+                regulator-always-on;
+                enable-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+            };
+        };
+    };
+...
+
Signature · 1 line
2.41.0
maintainer
#4 lore raw
In reply to [email protected]
Quoted 5 lines · On Mon, 21 Aug 2023 03:53:53 +0000, [email protected] wrote:

Add regulator driver for the device Awinic AW37503 which is single inductor - dual output power supply device. AW37503 device is designed to support general positive/negative driven applications like TFT display panels.

Quoted 8 lines

v4->v5: Delete the unnecessary '|' in the awinic,aw37503.yaml. v3->v4: Correct yamllint warnings/errors.
v2->v3: Switch to use the dev_err_probe().
Keep the Kconfig and Makefile sorted.
Correct yamllint warnings/errors.
v1->v2: Remove unneeded fields and correct yamllint warnings/errors.

[...]

Applied to

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

Thanks!

[1/2] regulator: aw37503: add regulator driver for Awinic AW37503

      commit: 2796a01cdf2c639e605088c53a1ac36923ade93c
[2/2] regulator: dt-bindings: Add Awinic AW37503
      commit: 86a1b61a0c7316febecd03d47eaf893eb5a57659

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