From d898ce03675fc061f89a347a22d41271ed75c436 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 2 Sep 2014 09:51:22 -0300 Subject: [PATCH] drm/tilcdc: panel: Add support for enable GPIO In order to support the "enable GPIO" available in many panel devices, this commit adds a proper devicetree binding. By providing an enable GPIO in the devicetree, the driver can now turn off and on the panel device, and/or the backlight device. Both the backlight and the GPIO are optional properties. Tested-by: Darren Etheridge Tested-by: Johannes Pointner Signed-off-by: Ezequiel Garcia Signed-off-by: Dave Airlie --- .../devicetree/bindings/drm/tilcdc/panel.txt | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_panel.c | 37 +++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt b/Documentation/devicetree/bindings/drm/tilcdc/panel.txt index 10a06e826b4a..4ab9e2300907 100644 --- a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt +++ b/Documentation/devicetree/bindings/drm/tilcdc/panel.txt @@ -20,6 +20,7 @@ Required properties: Optional properties: - backlight: phandle of the backlight device attached to the panel +- enable-gpios: GPIO pin to enable or disable the panel Recommended properties: - pinctrl-names, pinctrl-0: the pincontrol settings to configure @@ -33,6 +34,7 @@ Example: pinctrl-names = "default"; pinctrl-0 = <&bone_lcd3_cape_lcd_pins>; backlight = <&backlight>; + enable-gpios = <&gpio3 19 0>; panel-info { ac-bias = <255>; diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index f2a5b23782fa..7a0315855e90 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -18,6 +18,7 @@ #include #include #include +#include #include