regulator: rt4801: Add support for RT4801 Display Bias regulator driver
Subsystems (2)
PATCH 1/3 regulator: rt4801: Add support for RT4801 Display Bias regulator driver
From: ChiYuan Huang <[email protected]>
Adds support for the RT4801 DSV. It has two regulators (DSVP/DSVN) with an I2C interface. DSVP/DSVN can provide the display panel module for the positive/negative voltage range from (+/-)4V to (+/-)6V.
--- drivers/regulator/Kconfig | 7 ++ drivers/regulator/Makefile | 1 + drivers/regulator/rt4801-regulator.c | 223 +++++++++++++++++++++++++++++++++++ 3 files changed, 231 insertions(+) create mode 100644 drivers/regulator/rt4801-regulator.c
drivers/regulator/Kconfig +7 -0
@@ -894,6 +894,13 @@ config REGULATOR_RN5T618 config REGULATOR_ROHM tristate +config REGULATOR_RT4801 + tristate "Richtek RT4801 Regulators" + depends on I2C + help + This adds support for voltage regulators in Richtek RT4801 Display Bias IC. + The device supports two regulators (DSVP/DSVN). + config REGULATOR_RT5033 tristate "Richtek RT5033 Regulators" depends on MFD_RT5033
drivers/regulator/Makefile +1 -0
@@ -111,6 +111,7 @@ obj-$(CONFIG_REGULATOR_RC5T583) += rc5t583-regulator.o obj-$(CONFIG_REGULATOR_RK808) += rk808-regulator.o obj-$(CONFIG_REGULATOR_RN5T618) += rn5t618-regulator.o obj-$(CONFIG_REGULATOR_ROHM) += rohm-regulator.o +obj-$(CONFIG_REGULATOR_RT4801) += rt4801-regulator.o obj-$(CONFIG_REGULATOR_RT5033) += rt5033-regulator.o obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o
drivers/regulator/rt4801-regulator.c new file +223 -0
223 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 2/3 regulator: rt4801: Add DT binding documentation
From: ChiYuan Huang <[email protected]>
Add a devicetree binding documentation for the rt4801 regulator driver.
--- .../regulator/richtek,rt4801-regulator.yaml | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml new file +80 -0
@@ -0,0 +1,80 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rt4801-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RT4801 Display Bias regulators + +maintainers: + - ChiYuan Huang <[email protected]> + +description: | + Regulator nodes should be named to DSVP and DSVN. The + definition for each of these nodes is defined using the standard + binding for regulators at + Documentation/devicetree/bindings/regulator/regulator.txt. + Datasheet is available at + https://www.richtek.com/assets/product_file/RT4801H/DS4801H-00.pdf + +#The valid names for RT4801 regulator nodes are: +#DSVP, DSVN + +properties: + compatible: + enum: + - richtek,rt4801 + + reg: + maxItems: 1 + + enable-gpios: + description: GPIOs to use to enable DSVP/DSVN regulator. + The first one is ENP to enable DSVP, and second one is ENM to enable DSVN. + Number of GPIO in the array list could be 1 or 2. + If only one gpio is specified, only one gpio used to control ENP/ENM. + Else both are spefied, DSVP/DSVN could be controlled individually. + Othersie, this property not specified. treat both as always-on regulator. + minItems: 1 + maxItems: 2 + +patternProperties: + "^DSV(P|N)$": + type: object + $ref: regulator.yaml# + description: + Properties for single display bias regulator. + +required: + - compatible + - reg + +additionalProperties: + - enable-gpios + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rt4801@73 { + compatible = "richtek,rt4801"; + reg = <0x73>; + enable-gpios = <&gpio26 2 0>, <&gpio26 3 0>; + + dsvp: DSVP { + regulator-name = "rt4801,dsvp"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6000000>; + regulator-boot-on; + }; + dsvn: DSVN { + regulator-name = "rt4801,dsvn"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6000000>; + regulator-boot-on; + }; + + }; + };
Signature · 1 line
2.7.4
PATCH 3/3 regulator: rt4801: Fix the dt-binding document for dtc check.
In reply to cy_huangFrom: ChiYuan Huang <[email protected]>
Fix the dt-binding document for dtc check.
--- .../devicetree/bindings/regulator/richtek,rt4801-regulator.yaml | 3 --- 1 file changed, 3 deletions(-)
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml +0 -3
@@ -49,9 +49,6 @@ required: - compatible - reg -additionalProperties: - - enable-gpios - examples: - | i2c {
Signature · 1 line
2.7.4
Rob Herring
maintainerRe: [PATCH 3/3] regulator: rt4801: Fix the dt-binding document for dtc check.
Quoted 3 lines · cy_huang
From: ChiYuan Huang <[email protected]>
Fix the dt-binding document for dtc check.
This should be squashed into the prior patch.
Quoted 11 lines
Signed-off-by ChiYuan Huang <[email protected]>--- .../devicetree/bindings/regulator/richtek,rt4801-regulator.yaml | 3 --- 1 file changed, 3 deletions(-)Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml +0
-0
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml required: · line 54
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml +0
-3@@ -49,9 +49,6 @@ required: - compatible - reg -additionalProperties: - - enable-gpios -
This should be:
additionalProperties: false
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml +0
-0examples: - | i2c {Signature · 1 line
2.7.4
Mark Brown
maintainerQuoted 3 lines · cy_huang
Adds support for the RT4801 DSV. It has two regulators (DSVP/DSVN) with an I2C interface. DSVP/DSVN can provide the display panel module for the positive/negative voltage range from (+/-)4V to (+/-)6V.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/3] regulator: rt4801: Add support for RT4801 Display Bias regulator driver
commit: 5bbbfc7f7f0a44b7a85ab3872dd2ccce7019f7b1
[2/3] regulator: rt4801: Add DT binding documentation
commit: fd6b928db8a05fcd8629320c52eae214a8615aae
[3/3] regulator: rt4801: Fix the dt-binding document for dtc check.
commit: 6f4ac2844b61d43c0c48b7c67a974d9f6e4ddd9cAll 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
Rob Herring
maintainerQuoted 9 lines · Mark Brown
Quoted 3 lines · cy_huang
Adds support for the RT4801 DSV. It has two regulators (DSVP/DSVN) with an I2C interface. DSVP/DSVN can provide the display panel module for the positive/negative voltage range from (+/-)4V to (+/-)6V.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Quoted 8 lines
Thanks!
[1/3] regulator: rt4801: Add support for RT4801 Display Bias regulator driver
commit: 5bbbfc7f7f0a44b7a85ab3872dd2ccce7019f7b1 [2/3] regulator: rt4801: Add DT binding documentation commit: fd6b928db8a05fcd8629320c52eae214a8615aae [3/3] regulator: rt4801: Fix the dt-binding document for dtc check. commit: 6f4ac2844b61d43c0c48b7c67a974d9f6e4ddd9c
Really? Despite my comments patch 3 should both be squashed and is still just wrong.
Rob
Mark Brown
maintainerQuoted 11 lines · Rob Herring
Quoted 6 lines · Mark Brown
[1/3] regulator: rt4801: Add support for RT4801 Display Bias regulator driver
commit: 5bbbfc7f7f0a44b7a85ab3872dd2ccce7019f7b1 [2/3] regulator: rt4801: Add DT binding documentation commit: fd6b928db8a05fcd8629320c52eae214a8615aae [3/3] regulator: rt4801: Fix the dt-binding document for dtc check. commit: 6f4ac2844b61d43c0c48b7c67a974d9f6e4ddd9cReally? Despite my comments patch 3 should both be squashed and is still just wrong.
Sorry, IIRC this raced with the patch being applied (the mails are generated after things are pushed, and the scripts take a while to run) and TBH I missed the bit with additionalProperties: false, it looked like a mail with no context deleted.