slg51000: regulator driver submission
Subsystems (3)
v2 cover slg51000: regulator driver submission
This patch adds support for the Dialog SLG51000 regulator device.
In this patch set the following is provided:
[PATCH V2 1/3] MAINTAINERS file update for SLG51000 [PATCH V2 2/3] SLG51000 DT binding
[PATCH V2 3/3] SLG51000 regulator driver
This patch applies against linux-next and next-20190417
Thank you,
Eric Jeong, Dialog Semiconductor Ltd.
Eric Jeong (3):
MAINTAINERS: slg51000 updates to the Dialog Semiconductor search
terms
dt-bindings: regulator: add document bindings for slg51000
regulator: slg51000: add slg51000 regulator driver
.../devicetree/bindings/regulator/slg51000.txt | 88 ++++ MAINTAINERS | 2 + drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/slg51000-regulator.c | 528 ++++++++++++++++++++ drivers/regulator/slg51000-regulator.h | 505 +++++++++++++++++++ 6 files changed, 1133 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/slg51000.txt create mode 100644 drivers/regulator/slg51000-regulator.c create mode 100644 drivers/regulator/slg51000-regulator.h
Signature · 1 line
end-of-patch for PATCH V2
PATCH v2 1/3 MAINTAINERS: slg51000 updates to the Dialog Semiconductor search terms
This patch adds the slg51000 bindings doc and driver to the Dialog Semiconductor support list.
---
v2: No changes.
MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
@@ -4632,6 +4632,7 @@ F: Documentation/devicetree/bindings/mfd/da90*.txt F: Documentation/devicetree/bindings/input/da90??-onkey.txt F: Documentation/devicetree/bindings/thermal/da90??-thermal.txt F: Documentation/devicetree/bindings/regulator/da92*.txt +F: Documentation/devicetree/bindings/regulator/slg51000.txt F: Documentation/devicetree/bindings/watchdog/da90??-wdt.txt F: Documentation/devicetree/bindings/sound/da[79]*.txt F: drivers/gpio/gpio-da90??.c
@@ -4647,6 +4648,7 @@ F: drivers/power/supply/da9052-battery.c F: drivers/power/supply/da91??-*.c F: drivers/regulator/da903x.c F: drivers/regulator/da9???-regulator.[ch] +F: drivers/regulator/slg51000-regulator.[ch] F: drivers/thermal/da90??-thermal.c F: drivers/rtc/rtc-da90??.c F: drivers/video/backlight/da90??_bl.c
Signature · 1 line
end-of-patch for PATCH V2
Mark Brown
maintainerApplied "MAINTAINERS: slg51000 updates to the Dialog Semiconductor search terms" to the regulator tree
The patch
MAINTAINERS: slg51000 updates to the Dialog Semiconductor search terms
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.2
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
Quoted 1 line
From
4b01c5afc1817a966065d7da0fb962cc591c6fadMon Sep 17 00:00:00 2001
From: Eric Jeong <[email protected]>
Date: Thu, 18 Apr 2019 15:09:43 +0900
Subject: [PATCH] MAINTAINERS: slg51000 updates to the Dialog Semiconductor
search terms
This patch adds the slg51000 bindings doc and driver to the Dialog Semiconductor support list.
--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
@@ -4603,6 +4603,7 @@ F: Documentation/devicetree/bindings/mfd/da90*.txt F: Documentation/devicetree/bindings/input/da90??-onkey.txt F: Documentation/devicetree/bindings/thermal/da90??-thermal.txt F: Documentation/devicetree/bindings/regulator/da92*.txt +F: Documentation/devicetree/bindings/regulator/slg51000.txt F: Documentation/devicetree/bindings/watchdog/da90??-wdt.txt F: Documentation/devicetree/bindings/sound/da[79]*.txt F: drivers/gpio/gpio-da90??.c
@@ -4618,6 +4619,7 @@ F: drivers/power/supply/da9052-battery.c F: drivers/power/supply/da91??-*.c F: drivers/regulator/da903x.c F: drivers/regulator/da9???-regulator.[ch] +F: drivers/regulator/slg51000-regulator.[ch] F: drivers/thermal/da90??-thermal.c F: drivers/rtc/rtc-da90??.c F: drivers/video/backlight/da90??_bl.c
Signature · 1 line
2.20.1
PATCH v2 2/3 dt-bindings: regulator: add document bindings for slg51000
In reply to Eric JeongAdd device tree binding information for slg51000 regulator driver. Example bindings for SLG51000 are added.
---
This patch applies against linux-next and next-20190417
v2: No changes.
.../devicetree/bindings/regulator/slg51000.txt | 88 ++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/slg51000.txt
Documentation/devicetree/bindings/regulator/slg51000.txt new file +88 -0
@@ -0,0 +1,88 @@ +* Dialog Semiconductor SLG51000 Voltage Regulator + +Required properties: +- compatible : Should be "dlg,slg51000" for SLG51000 +- reg : Specifies the I2C slave address. +- xxx-supply: Input voltage supply regulator for ldo3 to ldo7. + These entries are required if regulators are enabled for a device. + An absence of these properties can cause the regulator registration to fail. + If some of input supply is powered through battery or always-on supply then + also it is required to have these parameters with proper node handle of always + on power supply. + vin3-supply: Input supply for ldo3 + vin4-supply: Input supply for ldo4 + vin5-supply: Input supply for ldo5 + vin6-supply: Input supply for ldo6 + vin7-supply: Input supply for ldo7 + +Optional properties: +- interrupt-parent : Specifies the reference to the interrupt controller. +- interrupts : IRQ line information. +- dlg,cs-gpios : Specify a valid GPIO for chip select + +Sub-nodes: +- regulators : This node defines the settings for the regulators. + The content of the sub-node is defined by the standard binding + for regulators; see regulator.txt. + + The SLG51000 regulators are bound using their names listed below: + ldo1 + ldo2 + ldo3 + ldo4 + ldo5 + ldo6 + ldo7 + +Optional properties for regulators: +- enable-gpios : Specify a valid GPIO for platform control of the regulator. + +Example: + pmic: slg51000@75 { + compatible = "dlg,slg51000"; + reg = <0x75>; + + regulators { + ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + }; + + ldo2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + }; + + ldo3 { + regulator-name = "ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + + ldo4 { + regulator-name = "ldo4"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + + ldo5 { + regulator-name = "ldo5"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1200000>; + }; + + ldo6 { + regulator-name = "ldo6"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1200000>; + }; + + ldo7 { + regulator-name = "ldo7"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + }; + };
Signature · 1 line
end-of-patch for PATCH V2
Mark Brown
maintainerApplied "dt-bindings: regulator: add document bindings for slg51000" to the regulator tree
The patch
dt-bindings: regulator: add document bindings for slg51000
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.2
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
Quoted 1 line
From
3e66a006c10fd23855b5bb0fc4ff9949b80f7724Mon Sep 17 00:00:00 2001
From: Eric Jeong <[email protected]>
Date: Thu, 18 Apr 2019 15:09:44 +0900
Subject: [PATCH] dt-bindings: regulator: add document bindings for slg51000
Add device tree binding information for slg51000 regulator driver. Example bindings for SLG51000 are added.
--- .../bindings/regulator/slg51000.txt | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/slg51000.txt
Documentation/devicetree/bindings/regulator/slg51000.txt new file +88 -0
@@ -0,0 +1,88 @@ +* Dialog Semiconductor SLG51000 Voltage Regulator + +Required properties: +- compatible : Should be "dlg,slg51000" for SLG51000 +- reg : Specifies the I2C slave address. +- xxx-supply: Input voltage supply regulator for ldo3 to ldo7. + These entries are required if regulators are enabled for a device. + An absence of these properties can cause the regulator registration to fail. + If some of input supply is powered through battery or always-on supply then + also it is required to have these parameters with proper node handle of always + on power supply. + vin3-supply: Input supply for ldo3 + vin4-supply: Input supply for ldo4 + vin5-supply: Input supply for ldo5 + vin6-supply: Input supply for ldo6 + vin7-supply: Input supply for ldo7 + +Optional properties: +- interrupt-parent : Specifies the reference to the interrupt controller. +- interrupts : IRQ line information. +- dlg,cs-gpios : Specify a valid GPIO for chip select + +Sub-nodes: +- regulators : This node defines the settings for the regulators. + The content of the sub-node is defined by the standard binding + for regulators; see regulator.txt. + + The SLG51000 regulators are bound using their names listed below: + ldo1 + ldo2 + ldo3 + ldo4 + ldo5 + ldo6 + ldo7 + +Optional properties for regulators: +- enable-gpios : Specify a valid GPIO for platform control of the regulator. + +Example: + pmic: slg51000@75 { + compatible = "dlg,slg51000"; + reg = <0x75>; + + regulators { + ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + }; + + ldo2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + }; + + ldo3 { + regulator-name = "ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + + ldo4 { + regulator-name = "ldo4"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + + ldo5 { + regulator-name = "ldo5"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1200000>; + }; + + ldo6 { + regulator-name = "ldo6"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1200000>; + }; + + ldo7 { + regulator-name = "ldo7"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3750000>; + }; + }; + };
Signature · 1 line
2.20.1
PATCH v2 3/3 regulator: slg51000: add slg51000 regulator driver
In reply to Eric JeongAdding regulator driver for the device Dialog SLG51000.
The SLG51000 device contains seven compact and customizable low dropout regulators and is designed for high performance camera modules and other small multi-rail applications.
---
This patch applies against linux-next and next-20190417
I updated regulator_ops structure to use use the helper function which is regulator_is_enabled_regmap() instead reading status bits for is_enabled() operation.
v2: use regulator helper function for is_enabled()
drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/slg51000-regulator.c | 528 ++++++++++++++++++++++++++++++++ drivers/regulator/slg51000-regulator.h | 505 ++++++++++++++++++++++++++++++ 4 files changed, 1043 insertions(+) create mode 100644 drivers/regulator/slg51000-regulator.c create mode 100644 drivers/regulator/slg51000-regulator.h
drivers/regulator/Kconfig +9 -0
@@ -828,6 +828,15 @@ config REGULATOR_SKY81452 This driver can also be built as a module. If so, the module will be called sky81452-regulator. +config REGULATOR_SLG51000 + tristate "Dialog Semiconductor SLG51000 regulators" + depends on I2C + select REGMAP_I2C + help + Say y here to support for the Dialog Semiconductor SLG51000. + The SLG51000 is seven compact and customizable low dropout + regulators. + config REGULATOR_STM32_VREFBUF tristate "STMicroelectronics STM32 VREFBUF" depends on ARCH_STM32 || COMPILE_TEST
drivers/regulator/Makefile +1 -0
@@ -104,6 +104,7 @@ obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o +obj-$(CONFIG_REGULATOR_SLG51000) += slg51000-regulator.o obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o obj-$(CONFIG_REGULATOR_STM32_PWR) += stm32-pwr.o obj-$(CONFIG_REGULATOR_STPMIC1) += stpmic1_regulator.o
drivers/regulator/slg51000-regulator.c new file +528 -0
528 lines not on this page · raw message
drivers/regulator/slg51000-regulator.h new file +505 -0
505 lines not on this page · raw message
Signature · 1 line
end-of-patch for PATCH V2
Mark Brown
maintainerRe: [PATCH V2 3/3] regulator: slg51000: add slg51000 regulator driver
Quoted 5 lines · Eric Jeong
I updated
regulator_opsstructure to use use the helper function which isregulator_is_enabled_regmap()instead reading status bits foris_enabled()operation.v2: use regulator helper function for
is_enabled()
There's also the get_status() operation which you should be able to implement using the status bits you were reading before - that lets the framework know if the regualtor is actually working which can help with error handling so it's good to do.
Mark Brown
maintainerApplied "regulator: slg51000: add slg51000 regulator driver" to the regulator tree
In reply to Eric JeongThe patch
regulator: slg51000: add slg51000 regulator driver
has been applied to the regulator tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.2
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
Quoted 1 line
From
065e3e92a10e3b0e7a933baff4835fa6a0f2da1eMon Sep 17 00:00:00 2001
From: Eric Jeong <[email protected]>
Date: Thu, 18 Apr 2019 15:09:44 +0900
Subject: [PATCH] regulator: slg51000: add slg51000 regulator driver
Adding regulator driver for the device Dialog SLG51000.
The SLG51000 device contains seven compact and customizable low dropout regulators and is designed for high performance camera modules and other small multi-rail applications.
--- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/slg51000-regulator.c | 528 +++++++++++++++++++++++++ drivers/regulator/slg51000-regulator.h | 505 +++++++++++++++++++++++ 4 files changed, 1043 insertions(+) create mode 100644 drivers/regulator/slg51000-regulator.c create mode 100644 drivers/regulator/slg51000-regulator.h
drivers/regulator/Kconfig +9 -0
@@ -828,6 +828,15 @@ config REGULATOR_SKY81452 This driver can also be built as a module. If so, the module will be called sky81452-regulator. +config REGULATOR_SLG51000 + tristate "Dialog Semiconductor SLG51000 regulators" + depends on I2C + select REGMAP_I2C + help + Say y here to support for the Dialog Semiconductor SLG51000. + The SLG51000 is seven compact and customizable low dropout + regulators. + config REGULATOR_STM32_VREFBUF tristate "STMicroelectronics STM32 VREFBUF" depends on ARCH_STM32 || COMPILE_TEST
drivers/regulator/Makefile +1 -0
@@ -104,6 +104,7 @@ obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o +obj-$(CONFIG_REGULATOR_SLG51000) += slg51000-regulator.o obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o obj-$(CONFIG_REGULATOR_STM32_PWR) += stm32-pwr.o obj-$(CONFIG_REGULATOR_STPMIC1) += stpmic1_regulator.o
drivers/regulator/slg51000-regulator.c new file +528 -0
528 lines not on this page · raw message
drivers/regulator/slg51000-regulator.h new file +505 -0
505 lines not on this page · raw message
Signature · 1 line
2.20.1