* [PATCH] i.MX framebuffer remove ifdefs
@ 2007-05-15 9:21 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2007-05-15 9:21 UTC (permalink / raw)
To: linux-fbdev-devel
Here are some small fixes for the imxfb framebuffer driver:
- remove ifndef for MX1FS2 platform which is not present in the kernel.
- REV, CLS, PS and SPL_SPR are only needed with some sharp displays.
Only setup the corresponding io pins when such a display is connected.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/video/imxfb.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
Index: linux-2.6/drivers/video/imxfb.c
===================================================================
--- linux-2.6.orig/drivers/video/imxfb.c
+++ linux-2.6/drivers/video/imxfb.c
@@ -394,26 +394,18 @@ static void imxfb_setup_gpio(struct imxf
/* initialize GPIOs */
imx_gpio_mode(PD6_PF_LSCLK);
- imx_gpio_mode(PD10_PF_SPL_SPR);
imx_gpio_mode(PD11_PF_CONTRAST);
imx_gpio_mode(PD14_PF_FLM_VSYNC);
imx_gpio_mode(PD13_PF_LP_HSYNC);
- imx_gpio_mode(PD7_PF_REV);
- imx_gpio_mode(PD8_PF_CLS);
-
-#ifndef CONFIG_MACH_PIMX1
- /* on PiMX1 used as buffers enable signal
- */
- imx_gpio_mode(PD9_PF_PS);
-#endif
-
-#ifndef CONFIG_MACH_MX1FS2
- /* on mx1fs2 this pin is used to (de)activate the display, so we need
- * it as a normal gpio
- */
imx_gpio_mode(PD12_PF_ACD_OE);
-#endif
+ /* These are only needed for Sharp HR TFT displays */
+ if (fbi->pcr & PCR_SHARP) {
+ imx_gpio_mode(PD7_PF_REV);
+ imx_gpio_mode(PD8_PF_CLS);
+ imx_gpio_mode(PD9_PF_PS);
+ imx_gpio_mode(PD10_PF_SPL_SPR);
+ }
}
#ifdef CONFIG_PM
@@ -499,6 +491,7 @@ static int __init imxfb_init_fbinfo(stru
info->var.sync = inf->sync;
info->var.grayscale = inf->cmap_greyscale;
fbi->cmap_inverse = inf->cmap_inverse;
+ fbi->cmap_static = inf->cmap_static;
fbi->pcr = inf->pcr;
fbi->lscr1 = inf->lscr1;
fbi->dmacr = inf->dmacr;
--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-15 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15 9:21 [PATCH] i.MX framebuffer remove ifdefs Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).