Skip to contentSkip to conversation

fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver

PATCH Superseded Mike Frysinger 3 participants 9 messages Sep 14, 2009 – Oct 6, 2009 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver

From: Michael Hennerich <[email protected]>

Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

---
 arch/blackfin/include/asm/bfin-lq035q1.h |   28 +
 drivers/video/Kconfig                    |   13 +
 drivers/video/Makefile                   |    1 +
 drivers/video/bfin-lq035q1-fb.c          |  855 ++++++++++++++++++++++++++++++
 4 files changed, 897 insertions(+), 0 deletions(-)
 create mode 100644 arch/blackfin/include/asm/bfin-lq035q1.h
 create mode 100644 drivers/video/bfin-lq035q1-fb.c
arch/blackfin/include/asm/bfin-lq035q1.h new file +28 -0
new file mode 100644
index 0000000..a87a6b6
@@ -0,0 +1,28 @@
+/*
+ * Blackfin LCD Framebufer driver SHARP LQ035Q1DH02
+ *
+ * Copyright 2008-2009 Analog Devices Inc.
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef BFIN_LQ035Q1_H
+#define BFIN_LQ035Q1_H
+
+#define LQ035_RL	(0 << 8)	/* Right -> Left Scan */
+#define LQ035_LR	(1 << 8)	/* Left -> Right Scan */
+#define LQ035_TB	(1 << 9)	/* Top -> Botton Scan */
+#define LQ035_BT	(0 << 9)	/* Botton -> Top Scan */
+#define LQ035_BGR	(1 << 11)	/* Use BGR format */
+#define LQ035_RGB	(0 << 11)	/* Use RGB format */
+#define LQ035_NORM	(1 << 13)	/* Reversal */
+#define LQ035_REV	(0 << 13)	/* Reversal */
+
+struct bfin_lq035q1fb_disp_info {
+
+	unsigned	mode;
+	/* GPIOs */
+	int		use_bl;
+	unsigned 	gpio_bl;
+};
+
+#endif /* BFIN_LQ035Q1_H */
drivers/video/Kconfig +13 -0
index 3b54b39..94501e0 100644
@@ -609,6 +609,19 @@ config FB_BFIN_T350MCQB
 	 This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
 	 It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
 
+config FB_BFIN_LQ035Q1
+	tristate "SHARP LQ035Q1DH02 TFT LCD"
+	depends on FB && BLACKFIN
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select BFIN_GPTIMERS
+	select SPI
+	help
+	  This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
+	  the Blackfin Landscape LCD EZ-Extender Card.
+	  This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
+	  It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
 
 config FB_STI
 	tristate "HP STI frame buffer device support"
drivers/video/Makefile +1 -0
index 01a819f..cc7682b 100644
@@ -134,6 +134,7 @@ obj-$(CONFIG_FB_EFI)              += efifb.o
 obj-$(CONFIG_FB_VGA16)            += vga16fb.o
 obj-$(CONFIG_FB_OF)               += offb.o
 obj-$(CONFIG_FB_BF54X_LQ043)	  += bf54x-lq043fb.o
+obj-$(CONFIG_FB_BFIN_LQ035Q1)     += bfin-lq035q1-fb.o
 obj-$(CONFIG_FB_BFIN_T350MCQB)	  += bfin-t350mcqb-fb.o
 obj-$(CONFIG_FB_MX3)		  += mx3fb.o
 
drivers/video/bfin-lq035q1-fb.c new file +855 -0

855 lines not on this page · raw message

Signature · 1 line
1.6.4.2
#1 lore raw

PATCH 1/1 fbdev: bfin-t350mcqb-fb: handle all resources in suspend/resume

From: Michael Hennerich <[email protected]>

The LCD commands DMA/timers as well as PPI which we need to save/restore.

---
 drivers/video/bfin-t350mcqb-fb.c |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)
drivers/video/bfin-t350mcqb-fb.c +23 -5
index 5cc36cf..46cb07f 100644
@@ -634,17 +634,35 @@ static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state)
 {
-	bfin_t350mcqb_disable_ppi();
-	disable_dma(CH_PPI);
-	bfin_write_PPI_STATUS(0xFFFF);
+	struct fb_info *fbinfo = platform_get_drvdata(pdev);
+	struct bfin_t350mcqbfb_info *fbi = fbinfo->par;
+
+	if (fbi->lq043_open_cnt) {
+		bfin_t350mcqb_disable_ppi();
+		disable_dma(CH_PPI);
+		bfin_t350mcqb_stop_timers();
+		bfin_write_PPI_STATUS(-1);
+	}
+
 
 	return 0;
 }
 
 static int bfin_t350mcqb_resume(struct platform_device *pdev)
 {
-	enable_dma(CH_PPI);
-	bfin_t350mcqb_enable_ppi();
+	struct fb_info *fbinfo = platform_get_drvdata(pdev);
+	struct bfin_t350mcqbfb_info *fbi = fbinfo->par;
+
+	if (fbi->lq043_open_cnt) {
+		bfin_t350mcqb_config_dma(fbi);
+		bfin_t350mcqb_config_ppi(fbi);
+		bfin_t350mcqb_init_timers();
+
+		/* start dma */
+		enable_dma(CH_PPI);
+		bfin_t350mcqb_enable_ppi();
+		bfin_t350mcqb_start_timers();
+	}
 
 	return 0;
 }
Signature · 1 line
1.6.4.2
#2 lore raw

PATCH 1/1 fbdev: bfin-t350mcqb-fb: fix LCD dimensions

In reply to Mike Frysinger

From: Michael Hennerich <[email protected]>

The height/width framebuffer members need to be set in millimeters so that software can do proper scaling.

---
 drivers/video/bfin-t350mcqb-fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/bfin-t350mcqb-fb.c +2 -2
index 46cb07f..2549c53 100644
@@ -487,8 +487,8 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev)
 
 	fbinfo->var.nonstd = 0;
 	fbinfo->var.activate = FB_ACTIVATE_NOW;
-	fbinfo->var.height = -1;
-	fbinfo->var.width = -1;
+	fbinfo->var.height = 53;
+	fbinfo->var.width = 70;
 	fbinfo->var.accel_flags = 0;
 	fbinfo->var.vmode = FB_VMODE_NONINTERLACED;
 
Signature · 1 line
1.6.4.2
#3 lore raw

PATCH v2 1/1 fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver

In reply to Mike Frysinger

From: Michael Hennerich <[email protected]>

Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

---
v2
- rename spidev driver to fix section mismatch warnings

 arch/blackfin/include/asm/bfin-lq035q1.h |   28 +
 drivers/video/Kconfig                    |   13 +
 drivers/video/Makefile                   |    1 +
 drivers/video/bfin-lq035q1-fb.c          |  855 ++++++++++++++++++++++++++++++
 4 files changed, 897 insertions(+), 0 deletions(-)
 create mode 100644 arch/blackfin/include/asm/bfin-lq035q1.h
 create mode 100644 drivers/video/bfin-lq035q1-fb.c
arch/blackfin/include/asm/bfin-lq035q1.h new file +28 -0
new file mode 100644
index 0000000..a87a6b6
@@ -0,0 +1,28 @@
+/*
+ * Blackfin LCD Framebuffer driver SHARP LQ035Q1DH02
+ *
+ * Copyright 2008-2009 Analog Devices Inc.
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef BFIN_LQ035Q1_H
+#define BFIN_LQ035Q1_H
+
+#define LQ035_RL	(0 << 8)	/* Right -> Left Scan */
+#define LQ035_LR	(1 << 8)	/* Left -> Right Scan */
+#define LQ035_TB	(1 << 9)	/* Top -> Botton Scan */
+#define LQ035_BT	(0 << 9)	/* Botton -> Top Scan */
+#define LQ035_BGR	(1 << 11)	/* Use BGR format */
+#define LQ035_RGB	(0 << 11)	/* Use RGB format */
+#define LQ035_NORM	(1 << 13)	/* Reversal */
+#define LQ035_REV	(0 << 13)	/* Reversal */
+
+struct bfin_lq035q1fb_disp_info {
+
+	unsigned	mode;
+	/* GPIOs */
+	int		use_bl;
+	unsigned 	gpio_bl;
+};
+
+#endif /* BFIN_LQ035Q1_H */
drivers/video/Kconfig +13 -0
index cef3e1d..bb10916 100644
@@ -611,6 +611,19 @@ config FB_BFIN_T350MCQB
 	 This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
 	 It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
 
+config FB_BFIN_LQ035Q1
+	tristate "SHARP LQ035Q1DH02 TFT LCD"
+	depends on FB && BLACKFIN
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select BFIN_GPTIMERS
+	select SPI
+	help
+	  This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
+	  the Blackfin Landscape LCD EZ-Extender Card.
+	  This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
+	  It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
 
 config FB_STI
 	tristate "HP STI frame buffer device support"
drivers/video/Makefile +1 -0
index 01a819f..cc7682b 100644
@@ -134,6 +134,7 @@ obj-$(CONFIG_FB_EFI)              += efifb.o
 obj-$(CONFIG_FB_VGA16)            += vga16fb.o
 obj-$(CONFIG_FB_OF)               += offb.o
 obj-$(CONFIG_FB_BF54X_LQ043)	  += bf54x-lq043fb.o
+obj-$(CONFIG_FB_BFIN_LQ035Q1)     += bfin-lq035q1-fb.o
 obj-$(CONFIG_FB_BFIN_T350MCQB)	  += bfin-t350mcqb-fb.o
 obj-$(CONFIG_FB_MX3)		  += mx3fb.o
 
drivers/video/bfin-lq035q1-fb.c new file +855 -0

855 lines not on this page · raw message

Signature · 1 line
1.6.5.rc1
#4 lore raw
Quoted 11 lines · On Thu, 17 Sep 2009 17:37:06 -0400 Mike Frysinger <[email protected]> wrote:

From: Michael Hennerich <[email protected]>

Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

...

drivers/video/Kconfig config FB_BFIN_T350MCQB · line 621

Quoted 8 lines
drivers/video/Kconfig +8 -0
+config FB_BFIN_LQ035Q1
+	tristate "SHARP LQ035Q1DH02 TFT LCD"
+	depends on FB && BLACKFIN
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select BFIN_GPTIMERS
+	select SPI

Are we sure about the select SPI'? There's only one other place in the kernel which does this, and select' often makes things explode. I fear that you're either selecting the wrong thing or you're selecting something which won't work well.

drivers/video/Kconfig config FB_BFIN_T350MCQB

Quoted 12 lines
drivers/video/Kconfig +8 -0
+	help
+	  This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
+	  the Blackfin Landscape LCD EZ-Extender Card.
+	  This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
+	  It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
 
 
...
 
+
+#define DRIVER_NAME "bfin-lq035q1"
+static char driver_name[] = DRIVER_NAME;

Will the compielr magically put this string into read-only storage for us, or should we do that manually with `const'?

Quoted 11 lines

...

drivers/video/bfin-lq035q1-fb.c new file +8 -0
+static int lq035q1_control(unsigned char reg, unsigned short value)
+{
+	int ret;
+	u8 regs[3] = {LQ035_INDEX, 0, 0};
+	u8 dat[3] = {LQ035_DATA, 0, 0};
+
+	if (spi_control.spidev) {
+		regs[2] = reg;

drivers/video/bfin-lq035q1-fb.c line 174

Quoted 10 lines
drivers/video/bfin-lq035q1-fb.c new file +10 -0
+		dat[1] = value >> 8;
+		dat[2] = value & 0xFF;
+
+		ret = spi_write(spi_control.spidev, regs, ARRAY_SIZE(regs));
+		ret |= spi_write(spi_control.spidev, dat, ARRAY_SIZE(dat));
+	} else
+		return -ENODEV;
+
+	return ret;
+}

I am suspecting that this function (and the similar ones below) rely upon state within the hardware and will hence misbehave if two instances are run concurrently.

Is that correct> If so, is there locking to prevent this from occurring?

Quoted 3 lines

...

#5 lore raw
Quoted 10 lines · Andrew Morton
Quoted 8 lines · On Thu, 17 Sep 2009 17:37:06 -0400 Mike Frysinger wrote:

+config FB_BFIN_LQ035Q1
+     tristate "SHARP LQ035Q1DH02 TFT LCD"
+     depends on FB && BLACKFIN
+     select FB_CFB_FILLRECT
+     select FB_CFB_COPYAREA
+     select FB_CFB_IMAGEBLIT
+     select BFIN_GPTIMERS
+     select SPI

Quoted 4 lines

Are we sure about the select SPI'?  There's only one other place in the kernel which does this, and select' often makes things explode.  I fear that you're either selecting the wrong thing or you're selecting something which won't work well.

is it there on purpose and is it not just a mistaken typo ? yes. do we really need it and will we cry if it changes to a "depends" ? no.

it's just confusing to have a device driver disappear if SPI is disabled, but considering SPI is enabled by default now, it's not a big deal.

Quoted 5 lines

drivers/video/bfin-lq035q1-fb.c line 131

Quoted 2 lines
drivers/video/bfin-lq035q1-fb.c new file +2 -0
+#define DRIVER_NAME "bfin-lq035q1"
+static char driver_name[] = DRIVER_NAME;

Will the compielr magically put this string into read-only storage for us, or should we do that manually with `const'?

is this question a rhetorical one ? oh no, infinite loop ...

i'll fix it up in v3

Quoted 23 lines
Quoted 8 lines
drivers/video/bfin-lq035q1-fb.c new file +8 -0
+static int lq035q1_control(unsigned char reg, unsigned short value)
+{
+     int ret;
+     u8 regs[3] = {LQ035_INDEX, 0, 0};
+     u8 dat[3] = {LQ035_DATA, 0, 0};
+
+     if (spi_control.spidev) {
+             regs[2] = reg;

drivers/video/bfin-lq035q1-fb.c line 174

Quoted 10 lines
drivers/video/bfin-lq035q1-fb.c new file +10 -0
+             dat[1] = value >> 8;
+             dat[2] = value & 0xFF;
+
+             ret = spi_write(spi_control.spidev, regs, ARRAY_SIZE(regs));
+             ret |= spi_write(spi_control.spidev, dat, ARRAY_SIZE(dat));
+     } else
+             return -ENODEV;
+
+     return ret;
+}

I am suspecting that this function (and the similar ones below) rely upon state within the hardware and will hence misbehave if two instances are run concurrently.

Quoted 1 line

Is that correct>  If so, is there locking to prevent this from occurring?

if by "instances" you mean "users" as in "multiple programs reading/writing the framebuffer concurrently", then probably. rather than handle the locking ourselves, it can be pushed to the SPI bus by having the regs/dat be transfers in a single message. -mike

#6 lore raw
Quoted 25 lines · Mike Frysinger
Quoted 24 lines · Andrew Morton
Quoted 8 lines · On Thu, 17 Sep 2009 17:37:06 -0400 Mike Frysinger wrote:
drivers/video/bfin-lq035q1-fb.c new file +8 -0
+static int lq035q1_control(unsigned char reg, unsigned short value)
+{
+     int ret;
+     u8 regs[3] = {LQ035_INDEX, 0, 0};
+     u8 dat[3] = {LQ035_DATA, 0, 0};
+
+     if (spi_control.spidev) {
+             regs[2] = reg;

drivers/video/bfin-lq035q1-fb.c line 174

Quoted 10 lines
drivers/video/bfin-lq035q1-fb.c new file +10 -0
+             dat[1] = value >> 8;
+             dat[2] = value & 0xFF;
+
+             ret = spi_write(spi_control.spidev, regs, ARRAY_SIZE(regs));
+             ret |= spi_write(spi_control.spidev, dat, ARRAY_SIZE(dat));
+     } else
+             return -ENODEV;
+
+     return ret;
+}

I am suspecting that this function (and the similar ones below) rely upon state within the hardware and will hence misbehave if two instances are run concurrently.

Quoted 6 lines
Quoted 1 line

Is that correct>  If so, is there locking to prevent this from occurring?

if by "instances" you mean "users" as in "multiple programs reading/writing the framebuffer concurrently", then probably.  rather than handle the locking ourselves, it can be pushed to the SPI bus by having the regs/dat be transfers in a single message.

hmm there shouldnt be any locking problems here actually. the spi access is only to initialize/shutdown, and there is a dedicated CS for each device. so i dont think anything here really needs changing (other than to allocate the spi_control global variable dynamically in the probe).
-mike

#7 lore raw

PATCH v2 1/3 fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver

In reply to Mike Frysinger

From: Michael Hennerich <[email protected]>

Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

---
v2
- fix some spelling typos
- rename spidev_spi to avoid section mismatches
- convert output pr_* to dev_*
- convert to new dev pm opts
- push the global vars into dynamic state
- clean up error handling code
- use common mmap code

 arch/blackfin/include/asm/bfin-lq035q1.h |   28 +
 drivers/video/Kconfig                    |   13 +
 drivers/video/Makefile                   |    1 +
 drivers/video/bfin-lq035q1-fb.c          |  826 ++++++++++++++++++++++++++++++
 4 files changed, 868 insertions(+), 0 deletions(-)
 create mode 100644 arch/blackfin/include/asm/bfin-lq035q1.h
 create mode 100644 drivers/video/bfin-lq035q1-fb.c
arch/blackfin/include/asm/bfin-lq035q1.h new file +28 -0
new file mode 100644
index 0000000..57bc21a
@@ -0,0 +1,28 @@
+/*
+ * Blackfin LCD Framebuffer driver SHARP LQ035Q1DH02
+ *
+ * Copyright 2008-2009 Analog Devices Inc.
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef BFIN_LQ035Q1_H
+#define BFIN_LQ035Q1_H
+
+#define LQ035_RL	(0 << 8)	/* Right -> Left Scan */
+#define LQ035_LR	(1 << 8)	/* Left -> Right Scan */
+#define LQ035_TB	(1 << 9)	/* Top -> Botton Scan */
+#define LQ035_BT	(0 << 9)	/* Botton -> Top Scan */
+#define LQ035_BGR	(1 << 11)	/* Use BGR format */
+#define LQ035_RGB	(0 << 11)	/* Use RGB format */
+#define LQ035_NORM	(1 << 13)	/* Reversal */
+#define LQ035_REV	(0 << 13)	/* Reversal */
+
+struct bfin_lq035q1fb_disp_info {
+
+	unsigned	mode;
+	/* GPIOs */
+	int		use_bl;
+	unsigned 	gpio_bl;
+};
+
+#endif /* BFIN_LQ035Q1_H */
drivers/video/Kconfig +13 -0
index 9bbb285..fb87e5f 100644
@@ -611,6 +611,19 @@ config FB_BFIN_T350MCQB
 	 This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
 	 It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
 
+config FB_BFIN_LQ035Q1
+	tristate "SHARP LQ035Q1DH02 TFT LCD"
+	depends on FB && BLACKFIN
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select BFIN_GPTIMERS
+	select SPI
+	help
+	  This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
+	  the Blackfin Landscape LCD EZ-Extender Card.
+	  This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
+	  It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
 
 config FB_STI
 	tristate "HP STI frame buffer device support"
drivers/video/Makefile +1 -0
index 80232e1..42df98d 100644
@@ -136,6 +136,7 @@ obj-$(CONFIG_FB_EFI)              += efifb.o
 obj-$(CONFIG_FB_VGA16)            += vga16fb.o
 obj-$(CONFIG_FB_OF)               += offb.o
 obj-$(CONFIG_FB_BF54X_LQ043)	  += bf54x-lq043fb.o
+obj-$(CONFIG_FB_BFIN_LQ035Q1)     += bfin-lq035q1-fb.o
 obj-$(CONFIG_FB_BFIN_T350MCQB)	  += bfin-t350mcqb-fb.o
 obj-$(CONFIG_FB_MX3)		  += mx3fb.o
 obj-$(CONFIG_FB_DA8XX)		  += da8xx-fb.o
drivers/video/bfin-lq035q1-fb.c new file +826 -0

826 lines not on this page · raw message

Signature · 1 line
1.6.5.rc2
#8 lore raw

PATCH v4 1/1 fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver

From: Michael Hennerich <[email protected]>

Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

---
v4
- fix Kconfig SPI depend pointed out by akpm
- add module info to Kconfig help text

 arch/blackfin/include/asm/bfin-lq035q1.h |   28 +
 drivers/video/Kconfig                    |   15 +
 drivers/video/Makefile                   |    1 +
 drivers/video/bfin-lq035q1-fb.c          |  826 ++++++++++++++++++++++++++++++
 4 files changed, 870 insertions(+), 0 deletions(-)
 create mode 100644 arch/blackfin/include/asm/bfin-lq035q1.h
 create mode 100644 drivers/video/bfin-lq035q1-fb.c
arch/blackfin/include/asm/bfin-lq035q1.h new file +28 -0
new file mode 100644
index 0000000..57bc21a
@@ -0,0 +1,28 @@
+/*
+ * Blackfin LCD Framebuffer driver SHARP LQ035Q1DH02
+ *
+ * Copyright 2008-2009 Analog Devices Inc.
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef BFIN_LQ035Q1_H
+#define BFIN_LQ035Q1_H
+
+#define LQ035_RL	(0 << 8)	/* Right -> Left Scan */
+#define LQ035_LR	(1 << 8)	/* Left -> Right Scan */
+#define LQ035_TB	(1 << 9)	/* Top -> Botton Scan */
+#define LQ035_BT	(0 << 9)	/* Botton -> Top Scan */
+#define LQ035_BGR	(1 << 11)	/* Use BGR format */
+#define LQ035_RGB	(0 << 11)	/* Use RGB format */
+#define LQ035_NORM	(1 << 13)	/* Reversal */
+#define LQ035_REV	(0 << 13)	/* Reversal */
+
+struct bfin_lq035q1fb_disp_info {
+
+	unsigned	mode;
+	/* GPIOs */
+	int		use_bl;
+	unsigned 	gpio_bl;
+};
+
+#endif /* BFIN_LQ035Q1_H */
drivers/video/Kconfig +15 -0
index 9bbb285..bfc26d8 100644
@@ -611,6 +611,21 @@ config FB_BFIN_T350MCQB
 	 This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI
 	 It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK.
 
+config FB_BFIN_LQ035Q1
+	tristate "SHARP LQ035Q1DH02 TFT LCD"
+	depends on FB && BLACKFIN && SPI
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select BFIN_GPTIMERS
+	help
+	  This is the framebuffer device driver for a SHARP LQ035Q1DH02 TFT display found on
+	  the Blackfin Landscape LCD EZ-Extender Card.
+	  This display is a QVGA 320x240 18-bit RGB display interfaced by an 16-bit wide PPI
+	  It uses PPI[0..15] PPI_FS1, PPI_FS2 and PPI_CLK.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called bfin-lq035q1-fb.
 
 config FB_STI
 	tristate "HP STI frame buffer device support"
drivers/video/Makefile +1 -0
index 80232e1..42df98d 100644
@@ -136,6 +136,7 @@ obj-$(CONFIG_FB_EFI)              += efifb.o
 obj-$(CONFIG_FB_VGA16)            += vga16fb.o
 obj-$(CONFIG_FB_OF)               += offb.o
 obj-$(CONFIG_FB_BF54X_LQ043)	  += bf54x-lq043fb.o
+obj-$(CONFIG_FB_BFIN_LQ035Q1)     += bfin-lq035q1-fb.o
 obj-$(CONFIG_FB_BFIN_T350MCQB)	  += bfin-t350mcqb-fb.o
 obj-$(CONFIG_FB_MX3)		  += mx3fb.o
 obj-$(CONFIG_FB_DA8XX)		  += da8xx-fb.o
drivers/video/bfin-lq035q1-fb.c new file +826 -0

826 lines not on this page · raw message

Signature · 9 lines
1.6.5.rc2


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf