drivers: regulator: Add MAX77503 regulator driver and bindings.
Subsystems (2)
cover drivers: regulator: Add MAX77503 regulator driver and bindings.
Add MAX77503 buck converter driver and devicetree bindings. Apply patches in sequence.
Gokhan Celik (2):
drivers: regulator: Add MAX77503 regulator driver
dt-bindings: regulator: Add MAX77503 regulator bindings
.../regulator/adi,max77503-regulator.yaml | 64 ++++++++ drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/max77503-regulator.c | 137 ++++++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml create mode 100644 drivers/regulator/max77503-regulator.c
Signature · 1 line
2.34.1
PATCH 2/2 dt-bindings: regulator: Add MAX77503 regulator bindings
Add bindings for MAX77503 buck converter.
--- .../regulator/adi,max77503-regulator.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (c) 2023 Analog Devices, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/adi,max77503-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices MAX77503 Buck Converter + +maintainers: + - Gokhan Celik <[email protected]> + +description: Analog Devices MAX77503 Buck Converter + +properties: + compatible: + enum: + - adi,max77503 + + reg: + description: I2C address of the device + items: + - enum: [0x1e, 0x24, 0x37] + + regulator: + type: object + $ref: regulator.yaml# + additionalProperties: false + description: | + Buck regulator + + properties: + regulator-name: true + regulator-always-on: true + regulator-boot-on: true + regulator-min-microvolt: + minimum: 800000 + regulator-max-microvolt: + maximum: 5000000 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77503@1e { + compatible = "adi,max77503"; + reg = <0x1e>; + regulator{ + regulator-name = "max777503-regulator"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + }; + }; +
Signature · 1 line
2.34.1
PATCH 1/2 drivers: regulator: Add MAX77503 regulator driver
In reply to Gokhan CelikAdd MAX77503 buck converter driver.
--- drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/max77503-regulator.c | 137 +++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 drivers/regulator/max77503-regulator.c
drivers/regulator/Kconfig +10 -0
@@ -556,6 +556,16 @@ config REGULATOR_MAX597X The MAX5970/5978 is a smart switch with no output regulation, but fault protection and voltage and current monitoring capabilities. +config REGULATOR_MAX77503 + tristate "Analog Devices MAX77503 Regulator" + depends on I2C + select REGMAP_I2C + help + This driver controls a Analog Devices MAX77503 14V input, 1.5A + high-efficiency buck converter via I2C bus. + Say M here if you want to include support for the regulator as a + module. + config REGULATOR_MAX77541 tristate "Analog Devices MAX77541/77540 Regulator" depends on MFD_MAX77541
drivers/regulator/Makefile +1 -0
@@ -68,6 +68,7 @@ obj-$(CONFIG_REGULATOR_LTC3676) += ltc3676.o obj-$(CONFIG_REGULATOR_MAX14577) += max14577-regulator.o obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o obj-$(CONFIG_REGULATOR_MAX597X) += max597x-regulator.o +obj-$(CONFIG_REGULATOR_MAX77503) += max77503-regulator.o obj-$(CONFIG_REGULATOR_MAX77541) += max77541-regulator.o obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o obj-$(CONFIG_REGULATOR_MAX77650) += max77650-regulator.o
drivers/regulator/max77503-regulator.c new file +137 -0
137 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH 2/2] dt-bindings: regulator: Add MAX77503 regulator bindings
In reply to Gokhan CelikQuoted 3 lines · Gokhan Celik
Add bindings for MAX77503 buck converter.
Signed-off-by Gokhan Celik <[email protected]>
Subject:
regulator: dt-bindings:
and drop final, redundant "bindings"
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml
Quoted 10 lines
--- .../regulator/adi,max77503-regulator.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yamlDocumentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +0
-0
Filename like compatible.
Quoted 16 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +15
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (c) 2023 Analog Devices, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/adi,max77503-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices MAX77503 Buck Converter + +maintainers: + - Gokhan Celik <[email protected]> + +description: Analog Devices MAX77503 Buck Converter + +properties:
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +10
-0+ compatible: + enum: + - adi,max77503 + + reg: + description: I2C address of the device + items: + - enum: [0x1e, 0x24, 0x37] + + regulator:
Why having this intermediate node? It's useless for one regulator, isn't it?
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 28
Quoted 3 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +3
-0+ type: object + $ref: regulator.yaml# + additionalProperties: false
You should rather use unevaluatedProperties:false and drop these ":true" properties below.
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 33
Quoted 5 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +5
-0+ description: | + Buck regulator + + properties: + regulator-name: true
Drop
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 34
Quoted 1 line
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +1
-0+ regulator-always-on: true
Drop
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 35
Quoted 1 line
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +1
-0+ regulator-boot-on: true
Drop
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 37
Quoted 2 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +2
-0+ regulator-min-microvolt: + minimum: 800000
maximum?
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 39
Quoted 2 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +2
-0+ regulator-max-microvolt: + maximum: 5000000
minimum?
Quoted 4 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +4
-0+ +additionalProperties: false + +required:
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 53
Quoted 10 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +10
-0+ - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + max77503@1e {
regulator@1e
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml line 64
Quoted 11 lines
Documentation/devicetree/bindings/regulator/adi,max77503-regulator.yaml new file +11
-0+ compatible = "adi,max77503"; + reg = <0x1e>; + regulator{ + regulator-name = "max777503-regulator"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <5000000>; + regulator-boot-on; + }; + }; + }; +
Best regards,
Krzysztof
Re: [PATCH 1/2] drivers: regulator: Add MAX77503 regulator driver
In reply to Gokhan CelikQuoted 4 lines · Gokhan Celik
Add MAX77503 buck converter driver.
Signed-off-by Gokhan Celik <[email protected]>---
Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching.
Quoted 4 lines
drivers/regulator/Kconfig | 10 ++ drivers/regulator/Makefile | 1 + drivers/regulator/max77503-regulator.c | 137 +++++++++++++++++++++++++ 3 files changed, 148 insertions(+)
Best regards,
Krzysztof