ARM: dts: mxs: Use the standard gpio reset binding
Fabio Estevam
reviewerPATCH v2 1/3 ARM: dts: mxs: Use the standard gpio reset binding
From: Fabio Estevam <[email protected]>
Instead of using a custom binding for turning on a GPIO that activates the panel, use the standard one.
---
Changes since v1:
- Adjust Subject, since the change is not specific to mx28evk
Documentation/devicetree/bindings/fb/mxsfb.txt | 5 +---- arch/arm/boot/dts/imx23-evk.dts | 8 +++++++- arch/arm/boot/dts/imx28-evk.dts | 8 +++++++- 3 files changed, 15 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/fb/mxsfb.txt +1 -4
@@ -8,9 +8,7 @@ Required properties: - display : phandle to display node (see below for details) Optional properties: -- panel-enable-gpios : Should specify the gpio for panel enable - -* display node +- display node Required properties: - bits-per-pixel : <16> for RGB565, <32> for RGB888/666.
@@ -25,7 +23,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 +7 -1
@@ -59,7 +59,7 @@ lcdif at 80030000 { pinctrl-names = "default"; pinctrl-0 = <&lcdif_24bit_pins_a>; - panel-enable-gpios = <&gpio1 18 0>; + resets = <&gpio_reset 0>; display = <&display>; status = "okay";
@@ -89,6 +89,12 @@ }; }; + gpio_reset: gpio-reset { + compatible = "gpio-reset"; + reset-gpios = <&gpio1 18 1>; + #reset-cells = <1>; + }; + apbx at 80040000 { pwm: pwm at 80064000 { pinctrl-names = "default";
arch/arm/boot/dts/imx28-evk.dts +7 -1
@@ -123,7 +123,7 @@ pinctrl-names = "default"; pinctrl-0 = <&lcdif_24bit_pins_a &lcdif_pins_evk>; - panel-enable-gpios = <&gpio3 30 0>; + resets = <&gpio_reset 0>; display = <&display>; status = "okay";
@@ -152,6 +152,12 @@ }; }; + gpio_reset: gpio-reset { + compatible = "gpio-reset"; + reset-gpios = <&gpio3 30 1>; + #reset-cells = <1>; + }; + can0: can at 80032000 { pinctrl-names = "default"; pinctrl-0 = <&can0_pins_a>;
Signature · 1 line
1.7.9.5
Fabio Estevam
reviewerPATCH v2 2/3 video: mxsfb: Remove custom method for retrieving GPIO
From: Fabio Estevam <[email protected]>
mxs device tree files should use the standard gpio reset binding, so no need to have this code inside the driver anymore.
---
Changes since v1:
- No changes
drivers/video/mxsfb.c | 19 ------------------- 1 file changed, 19 deletions(-)
drivers/video/mxsfb.c +0 -19
@@ -42,7 +42,6 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/of_device.h> -#include <linux/of_gpio.h> #include <video/of_display_timing.h> #include <linux/platform_device.h> #include <linux/clk.h>
@@ -859,8 +858,6 @@ static int mxsfb_probe(struct platform_device *pdev)struct fb_info *fb_info;struct fb_modelist *modelist;struct pinctrl *pinctrl; -int panel_enable; -enum of_gpio_flags flags;int ret;if (of_id)
@@ -904,22 +901,6 @@ static int mxsfb_probe(struct platform_device *pdev) goto fb_release; } - panel_enable =of_get_named_gpio_flags (pdev->dev.of_node, -"panel-enable-gpios" ,0 , &flags); -if (gpio_is_valid (panel_enable)) { -unsigned long f =GPIOF_OUT_INIT_HIGH ; -if (flags ==OF_GPIO_ACTIVE_LOW ) - f =GPIOF_OUT_INIT_LOW ; - ret =devm_gpio_request_one (&pdev->dev, panel_enable, - f,"panel-enable" ); -if (ret) { -dev_err (&pdev->dev, -"failed to request gpio %d: %d\n" , - panel_enable, ret); - goto fb_release; - } - } - fb_info->pseudo_palette =devm_kzalloc (&pdev->dev,sizeof (u32) *16 ,GFP_KERNEL );if (!fb_info->pseudo_palette) {
Signature · 1 line
1.7.9.5
Fabio Estevam
reviewerPATCH v2 3/3 ARM: mxs_defconfig: Enable CONFIG_RESET_GPIO
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
CONFIG_RESET_GPIO is required in order to enable a GPIO to turn on a LCD, for example.
---
Changes since v1:
- No changes
arch/arm/configs/mxs_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/mxs_defconfig +2 -0
@@ -147,6 +147,8 @@ CONFIG_COMMON_CLK_DEBUG=y CONFIG_IIO=y CONFIG_PWM=y CONFIG_PWM_MXS=y +CONFIG_RESET_CONTROLLER=y +CONFIG_RESET_GPIO=y CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT3_FS=y
Signature · 1 line
1.7.9.5