* [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator
@ 2016-03-21 21:10 Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 1/3] devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi Uwe Kleine-König
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2016-03-21 21:10 UTC (permalink / raw)
To: dri-devel, David Airlie; +Cc: Tomi Valkeinen, kernel
Hello,
the only change since v2 is that the patch now applies to the driver
after it was moved to drivers/gpu/drm.
Toni liked v2, only asked to fix the path and then add his review-by
tag. That's what I did.
Best regards
Uwe
Uwe Kleine-König (3):
devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi
drm/omap: panel-dpi: make (limited) use of a reset gpio
drm/omap: panel-dpi: implement support for a vcc regulator
.../bindings/display/panel/panel-dpi.txt | 2 ++
drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 23 ++++++++++++++++++++++
2 files changed, 25 insertions(+)
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/3] devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi
2016-03-21 21:10 [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator Uwe Kleine-König
@ 2016-03-21 21:10 ` Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 2/3] drm/omap: panel-dpi: make (limited) use of a reset gpio Uwe Kleine-König
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2016-03-21 21:10 UTC (permalink / raw)
To: dri-devel, David Airlie; +Cc: Tomi Valkeinen, kernel
Some displays have a reset input and/or need a regulator to function
properly. Allow to specify them for panel-dpi devices.
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Documentation/devicetree/bindings/display/panel/panel-dpi.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
index 216c894d4f99..b52ac52757df 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
@@ -7,6 +7,8 @@ Required properties:
Optional properties:
- label: a symbolic name for the panel
- enable-gpios: panel enable gpio
+- reset-gpios: GPIO to control the RESET pin
+- vcc-supply: phandle of regulator that will be used to enable power to the display
Required nodes:
- "panel-timing" containing video timings
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/3] drm/omap: panel-dpi: make (limited) use of a reset gpio
2016-03-21 21:10 [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 1/3] devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi Uwe Kleine-König
@ 2016-03-21 21:10 ` Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 3/3] drm/omap: panel-dpi: implement support for a vcc regulator Uwe Kleine-König
2016-04-18 16:06 ` [PATCH v3 0/3] drm/omap: support reset-gpios and " Tomi Valkeinen
3 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2016-03-21 21:10 UTC (permalink / raw)
To: dri-devel, David Airlie; +Cc: Tomi Valkeinen, kernel
Some displays have a reset input. To assert that the display is
functional the reset gpio must be deasserted.
Teach the driver to get and drive such a gpio accordingly.
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
index e780fd4f8b46..201a1c1a6f42 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
@@ -213,6 +213,16 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
ddata->enable_gpio = gpio;
+ /*
+ * Many different panels are supported by this driver and there are
+ * probably very different needs for their reset pins in regards to
+ * timing and order relative to the enable gpio. So for now it's just
+ * ensured that the reset line isn't active.
+ */
+ gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(gpio))
+ return PTR_ERR(gpio);
+
ddata->backlight_gpio = -ENOENT;
r = of_get_display_timing(node, "panel-timing", &timing);
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 3/3] drm/omap: panel-dpi: implement support for a vcc regulator
2016-03-21 21:10 [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 1/3] devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 2/3] drm/omap: panel-dpi: make (limited) use of a reset gpio Uwe Kleine-König
@ 2016-03-21 21:10 ` Uwe Kleine-König
2016-04-18 16:06 ` [PATCH v3 0/3] drm/omap: support reset-gpios and " Tomi Valkeinen
3 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2016-03-21 21:10 UTC (permalink / raw)
To: dri-devel, David Airlie; +Cc: Tomi Valkeinen, kernel
To allow supporting displays that need some logic to enable power to the
display try to get a vcc-supply property from the device tree and drive
the resulting regulator accordingly.
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
index 201a1c1a6f42..8c3f31ebff00 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
+#include <linux/regulator/consumer.h>
#include <video/omapdss.h>
#include <video/omap-panel-data.h>
@@ -32,6 +33,7 @@ struct panel_drv_data {
int backlight_gpio;
struct gpio_desc *enable_gpio;
+ struct regulator *vcc_supply;
};
#define to_panel_data(p) container_of(p, struct panel_drv_data, dssdev)
@@ -83,6 +85,12 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
if (r)
return r;
+ r = regulator_enable(ddata->vcc_supply);
+ if (r) {
+ in->ops.dpi->disable(in);
+ return r;
+ }
+
gpiod_set_value_cansleep(ddata->enable_gpio, 1);
if (gpio_is_valid(ddata->backlight_gpio))
@@ -105,6 +113,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
gpio_set_value_cansleep(ddata->backlight_gpio, 0);
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
+ regulator_disable(ddata->vcc_supply);
in->ops.dpi->disable(in);
@@ -223,6 +232,10 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
if (IS_ERR(gpio))
return PTR_ERR(gpio);
+ ddata->vcc_supply = devm_regulator_get(&pdev->dev, "vcc");
+ if (IS_ERR(ddata->vcc_supply))
+ return PTR_ERR(ddata->vcc_supply);
+
ddata->backlight_gpio = -ENOENT;
r = of_get_display_timing(node, "panel-timing", &timing);
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator
2016-03-21 21:10 [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator Uwe Kleine-König
` (2 preceding siblings ...)
2016-03-21 21:10 ` [PATCH v3 3/3] drm/omap: panel-dpi: implement support for a vcc regulator Uwe Kleine-König
@ 2016-04-18 16:06 ` Tomi Valkeinen
3 siblings, 0 replies; 5+ messages in thread
From: Tomi Valkeinen @ 2016-04-18 16:06 UTC (permalink / raw)
To: Uwe Kleine-König, dri-devel; +Cc: kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 763 bytes --]
On 21/03/16 23:10, Uwe Kleine-König wrote:
> Hello,
>
> the only change since v2 is that the patch now applies to the driver
> after it was moved to drivers/gpu/drm.
>
> Toni liked v2, only asked to fix the path and then add his review-by
> tag. That's what I did.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (3):
> devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi
> drm/omap: panel-dpi: make (limited) use of a reset gpio
> drm/omap: panel-dpi: implement support for a vcc regulator
>
> .../bindings/display/panel/panel-dpi.txt | 2 ++
> drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 23 ++++++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
Thanks, queued for 4.7.
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-18 16:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-21 21:10 [PATCH v3 0/3] drm/omap: support reset-gpios and vcc regulator Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 1/3] devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 2/3] drm/omap: panel-dpi: make (limited) use of a reset gpio Uwe Kleine-König
2016-03-21 21:10 ` [PATCH v3 3/3] drm/omap: panel-dpi: implement support for a vcc regulator Uwe Kleine-König
2016-04-18 16:06 ` [PATCH v3 0/3] drm/omap: support reset-gpios and " Tomi Valkeinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.