regulator: aw37503: add regulator driver for AWINIC AW37503
Subsystems (2)
v2 cover regulator: aw37503: add regulator driver for AWINIC AW37503
From: Alec Li <[email protected]>
v1->v2: Remove unneeded fields and correct yamllint warnings/errors.
Alec Li (2):
regulator: aw37503: Remove unneeded fields and switch to using
dev_err_probe()
regulator: dt-bindings: Correct yamllint warnings/errors
.../bindings/regulator/awinic,aw37503.yaml | 65 +++++ drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/aw37503-regulator.c | 240 ++++++++++++++++++ 4 files changed, 314 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml create mode 100644 drivers/regulator/aw37503-regulator.c
base-commit: c1a515d3c0270628df8ae5f5118ba859b85464a2
Signature · 1 line
2.41.0
PATCH v2 1/2 regulator: aw37503: Remove unneeded fields and switch to using dev_err_probe()
From: Alec Li <[email protected]>
These fields are not really need, remove them. Switching to use the dev_err_probe() will be easier. Keep the Kconfig and Makefile sorted.
--- 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
@@ -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
@@ -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
Mark Brown
maintainerRe: [PATCH v2 1/2] regulator: aw37503: Remove unneeded fields and switch to using dev_err_probe()
Quoted 5 lines · On Fri, Aug 04, 2023 at 10:27:02AM +0000, [email protected] wrote:
From: Alec Li <[email protected]>
These fields are not really need, remove them. Switching to use the
dev_err_probe()will be easier. Keep theKconfigandMakefilesorted.
This isn't a description of your patch, it is an inter-version changelog. As covered in submitting-patches.rst this should be after the ---.
PATCH v2 2/2 regulator: dt-bindings: Correct yamllint warnings/errors
In reply to [email protected]From: Alec Li <[email protected]>
These yamllint warnings/errors have been corrected.
--- .../bindings/regulator/awinic,aw37503.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml new file +65 -0
@@ -0,0 +1,65 @@ +# 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# + +additionalProperties: false + +required: + - compatible + - reg + - outp + - outn + +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 0>; + }; + + outn { + regulator-name = "outn"; + regulator-boot-on; + regulator-always-on; + enable-gpios = <&gpio 27 0>; + }; + }; + }; +...
Signature · 1 line
2.41.0
Re: [PATCH v2 2/2] regulator: dt-bindings: Correct yamllint warnings/errors
Quoted 3 lines · On Fri, Aug 04, 2023 at 10:27:03AM +0000, [email protected] wrote:
From: Alec Li <[email protected]>
These yamllint warnings/errors have been corrected.
This commit message makes no sense. Was this meant to be the changelog between version 1 & version 2?
Thanks,
Conor.
Quoted 80 lines
Signed-off-by Alec Li <[email protected]>--- .../bindings/regulator/awinic,aw37503.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/awinic,aw37503.yamlDocumentation/devicetree/bindings/regulator/awinic,aw37503.yaml new file +65
-0@@ -0,0 +1,65 @@ +# 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# + +additionalProperties: false + +required: + - compatible + - reg + - outp + - outn + +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 0>; + }; + + outn { + regulator-name = "outn"; + regulator-boot-on; + regulator-always-on; + enable-gpios = <&gpio 27 0>; + }; + }; + }; +...Signature · 1 line
2.41.0
Re: [PATCH v2 2/2] regulator: dt-bindings: Correct yamllint warnings/errors
In reply to [email protected]Quoted 2 lines · On 04/08/2023 12:27, [email protected] wrote:
From: Alec Li <[email protected]>
...
Subject: no improvements
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml line 28
Quoted 12 lines
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml new file +12
-0+ +properties: + compatible: + const: awinic,aw37503 + + reg: + maxItems: 1 + +patternProperties: + "^out[pn]$": + type: object + $ref: regulator.yaml#
This does not make much sense. You had here unvaluatedProperties. Why dropping it? I asked to drop additionalProperties. Open the email and look where the comments are given. In which context.
Quoted 16 lines
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml new file +16
-0+ +additionalProperties: false + +required: + - compatible + - reg + - outp + - outn + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>;
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml line 54
Quoted 10 lines
Documentation/devicetree/bindings/regulator/awinic,aw37503.yaml new file +10
-0+ + regulator@3e { + compatible = "awinic,aw37503"; + reg = <0x3e>; + + outp { + regulator-name = "outp"; + regulator-boot-on; + regulator-always-on; + enable-gpios = <&gpio 17 0>;
Please use proper defines.... you included the header for this.
Best regards,
Krzysztof