video: mxsfb: Introduce regulator support
Subsystems (3)
Fabio Estevam
reviewerPATCH v6 1/1 video: mxsfb: Introduce regulator support
From: Fabio Estevam <[email protected]>
Instead of using a custom binding for retrieving the GPIO that activates the LCD from devicetree, use a standard regulator.
This approach has the advantage to be more generic.
For example: in the case of a board that has a PMIC supplying the LCD voltage, the current approach would not work, as it only searches for a GPIO pin.
---
Changes since v5:
- Remove 'Optional properties' line from mxsfb.txt
- Place regultar_disable in the end of mxsfb_disable_controller
- Check for IS_ERR((IS_ERR(host->reg_lcd)) inside probe
Chages since v4:
- Merged the 2 previous patches into one in order not to break keep mxsfb functionality
- Remove unneeded change in mxsfb.txt
- Use regulator_disable to pair with regulator_enable
Changes since v3:
- None
Changes since v2:
- Use devm_regulator_get()
Changes since v1:
- No changes
Documentation/devicetree/bindings/fb/mxsfb.txt | 4 --- arch/arm/boot/dts/imx23-evk.dts | 11 ++++++- arch/arm/boot/dts/imx28-evk.dts | 11 ++++++- drivers/video/mxsfb.c | 41 +++++++++++++----------- 4 files changed, 43 insertions(+), 24 deletions(-)
Documentation/devicetree/bindings/fb/mxsfb.txt +0 -4
@@ -7,9 +7,6 @@ Required properties: - interrupts: Should contain lcdif interrupts - display : phandle to display node (see below for details) -Optional properties: -- panel-enable-gpios : Should specify the gpio for panel enable - * display node Required properties:
@@ -25,7 +22,6 @@ lcdif at 80030000 { compatible = "fsl,imx28-lcdif"; reg = <0x80030000 2000>; interrupts = <38 86>; - panel-enable-gpios = <&gpio3 30 0>; display: display { bits-per-pixel = <32>;
arch/arm/boot/dts/imx23-evk.dts +10 -1
@@ -59,7 +59,7 @@ lcdif at 80030000 { pinctrl-names = "default"; pinctrl-0 = <&lcdif_24bit_pins_a>; - panel-enable-gpios = <&gpio1 18 0>; + lcd-supply = <®_lcd_3v3>; display = <&display>; status = "okay";
@@ -120,6 +120,15 @@ regulator-max-microvolt = <3300000>; gpio = <&gpio1 29 0>; }; + + reg_lcd_3v3: lcd-3v3 { + compatible = "regulator-fixed"; + regulator-name = "lcd-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 18 0>; + enable-active-high; + }; }; backlight {
arch/arm/boot/dts/imx28-evk.dts +10 -1
@@ -123,7 +123,7 @@ pinctrl-names = "default"; pinctrl-0 = <&lcdif_24bit_pins_a &lcdif_pins_evk>; - panel-enable-gpios = <&gpio3 30 0>; + lcd-supply = <®_lcd_3v3>; display = <&display>; status = "okay";
@@ -310,6 +310,15 @@ gpio = <&gpio3 8 0>; enable-active-high; }; + + reg_lcd_3v3: lcd-3v3 { + compatible = "regulator-fixed"; + regulator-name = "lcd-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 30 0>; + enable-active-high; + }; }; sound {
drivers/video/mxsfb.c +23 -18
92 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Shawn Guo
AppliedPATCH v6 1/1 video: mxsfb: Introduce regulator support
Quoted 11 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Instead of using a custom binding for retrieving the GPIO that activates the LCD from devicetree, use a standard regulator.
This approach has the advantage to be more generic.
For example: in the case of a board that has a PMIC supplying the LCD voltage, the current approach would not work, as it only searches for a GPIO pin.
Signed-off-by Fabio Estevam <[email protected]>
Applied, thanks.