Re: [PATCH 01/25] OMAPDSS: panel-dvi: add PD gpio handling
flat view
From: Tomi Valkeinen <hidden>
Date: 2012-05-09 17:32:40
Also in:
linux-omap
On Wed, 2012-05-09 at 09:50 -0700, Russ Dill wrote:
On Thu, May 3, 2012 at 6:57 AM, Tomi Valkeinen [off-list ref] wrote:quoted
The driver for the TFP410 chip should handle the power-down signal of the chip, instead of the current way of handling it in the board files. This patch adds power_down_gpio into the device's platform data, and adds the necessary code in the driver to request and handle the GPIO. Signed-off-by: Tomi Valkeinen <redacted> --- drivers/video/omap2/displays/panel-dvi.c | 31 ++++++++++++++++++++++++++++++ include/video/omap-panel-dvi.h | 2 ++ 2 files changed, 33 insertions(+)diff --git a/drivers/video/omap2/displays/panel-dvi.c b/drivers/video/omap2/displays/panel-dvi.c index 03eb14a..876b798 100644 --- a/drivers/video/omap2/displays/panel-dvi.c +++ b/drivers/video/omap2/displays/panel-dvi.c@@ -21,6 +21,7 @@ #include <linux/slab.h> #include <video/omapdss.h> #include <linux/i2c.h> +#include <linux/gpio.h> #include <drm/drm_edid.h> #include <video/omap-panel-dvi.h>@@ -44,6 +45,8 @@ struct panel_drv_data { struct omap_dss_device *dssdev; struct mutex lock; + + int pd_gpio; }; static inline struct panel_dvi_platform_data@@ -54,6 +57,7 @@ static inline struct panel_dvi_platform_data static int panel_dvi_power_on(struct omap_dss_device *dssdev) { + struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); struct panel_dvi_platform_data *pdata = get_pdata(dssdev); int r;@@ -70,6 +74,9 @@ static int panel_dvi_power_on(struct omap_dss_device *dssdev) goto err1; } + if (gpio_is_valid(ddata->pd_gpio)) + gpio_set_value(ddata->pd_gpio, 1); +On Beagleboard xM, this GPIO is connected though an I2C chip so it sleeps. Can you change these to gpio_set_value_cansleep?
This patch has already been applied, so we have to do follow up patches for this. I can look at this tomorrow, but if you update your "ARM: OMAP: Cleanup Beagleboard DVI reset gpio" patch, will you take a look at this also? The applied patches can be found from here, so the follow up patches should be based on this: git://gitorious.org/linux-omap-dss2/linux.git for-l-o-3.5 Tomi
Attachments
- signature.asc [application/pgp-signature] 836 bytes