fbdev: add E-Ink Broadsheet controller support v2
RFC 1/2 fbdev: add E-Ink Broadsheet controller support v2
Hi arm, fbdev friends,
Thanks to Eric, Russell, Lothar, Geert, Magnus for feedback on the previous version. The changes are:
- cleanup indentation
- use wait_event
- use msleep instead of mdelay
- cleanup init_gpio_regs
- remove nonstd
- remove force
This patchset adds broadsheetfb and am300 support. Please let me know your feedback. If there aren't any complaints, then I think I'll post to the rmk patch queue. The am300 patch is dependent on the gumstix cleanup merged from Eric's pxa tree.
Thanks,
jaya
This patch adds support for the E-Ink Broadsheet display controller
--- drivers/video/Kconfig | 14 + drivers/video/Makefile | 1 + drivers/video/broadsheetfb.c | 568 ++++++++++++++++++++++++++++++++++++++++++ include/video/broadsheetfb.h | 59 +++++ 4 files changed, 642 insertions(+), 0 deletions(-) create mode 100644 drivers/video/broadsheetfb.c create mode 100644 include/video/broadsheetfb.h
drivers/video/Kconfig +14 -0
@@ -2115,6 +2115,20 @@ config FB_PRE_INIT_FB Select this option if display contents should be inherited as set by the bootloader. +config FB_BROADSHEET + tristate "E-Ink Broadsheet/Epson S1D13521 controller support" + depends on FB + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + select FB_DEFERRED_IO + help + This driver implements support for the E-Ink Broadsheet + controller. The release name for this device was Epson S1D13521 + and could also have been called by other names when coupled with + a bridge adapter. + source "drivers/video/omap/Kconfig" source "drivers/video/backlight/Kconfig"
drivers/video/Makefile +1 -0
@@ -106,6 +106,7 @@ obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o obj-$(CONFIG_FB_MAXINE) += maxinefb.o obj-$(CONFIG_FB_METRONOME) += metronomefb.o +obj-$(CONFIG_FB_BROADSHEET) += broadsheetfb.o obj-$(CONFIG_FB_S1D13XXX) += s1d13xxxfb.o obj-$(CONFIG_FB_SH7760) += sh7760fb.o obj-$(CONFIG_FB_IMX) += imxfb.o
drivers/video/broadsheetfb.c new file +568 -0
568 lines not on this page · raw message
include/video/broadsheetfb.h new file +59 -0
59 lines not on this page · raw message
Signature · 4 lines
1.5.2.3 ------------------------------------------------------------------------------
RFC 2/2 mach-pxa: add AM300 platform driver
This patch adds support for the AM300 platform driver.
--- arch/arm/mach-pxa/Kconfig | 3 + arch/arm/mach-pxa/Makefile | 1 + arch/arm/mach-pxa/am300epd.c | 294 ++++++++++++++++++++++++++++++ arch/arm/mach-pxa/gumstix.c | 6 + arch/arm/mach-pxa/include/mach/gumstix.h | 1 + 5 files changed, 305 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-pxa/am300epd.c
arch/arm/mach-pxa/Kconfig +3 -0
@@ -40,6 +40,9 @@ choice config GUMSTIX_AM200EPD bool "Enable AM200EPD board support" +config GUMSTIX_AM300EPD + bool "Enable AM300EPD board support" + endchoice config MACH_INTELMOTE2
arch/arm/mach-pxa/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o # Specific board support obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o +obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
arch/arm/mach-pxa/am300epd.c new file +294 -0
294 lines not on this page · raw message
arch/arm/mach-pxa/gumstix.c +6 -0
@@ -191,6 +191,11 @@ int __attribute__((weak)) am200_init(void)return 0 ; } +int __attribute__((weak))am300_init (void ) +{ +return 0 ; +} +static void __init carrier_board_init (void ) {/*
@@ -198,6 +203,7 @@ static void __init carrier_board_init(void)* they cannot be detected programatically */ am200_init (); +am300_init (); }static void __init gumstix_init (void )
arch/arm/mach-pxa/include/mach/gumstix.h +1 -0
@@ -97,4 +97,5 @@ has detected a cable insertion; driven low otherwise. *//* for expansion boards that can't be programatically detected */ extern int am200_init (void ); +extern int am300_init (void );
Signature · 4 lines
1.5.2.3 ------------------------------------------------------------------------------
drivers/video/broadsheetfb.c line 94
Quoted 7 lines · Jaya Kumar
drivers/video/broadsheetfb.c new file +7
-0+static void broadsheet_send_cmdargs (struct broadsheetfb_par *par,u16 cmd, +int argc,u16 *argv) +{ +int i; + + par->board->wait_for_rdy (par); +
You should probably check the return value of wait_for_rdy() and distinguish between:
== 0 => the GPIO was not found asserted within the timeout period < 0 => the wait was interrupted due to a signal
Quoted 1 line
0 => OK
Only in the last case the RDY_GPIO_PIN actually signalled a READY condition. In the other two cases you might not expect the hardware to do what you actually want it to do.
Otherwise you should probably better use the plain wait_event() instead of wait_event_interruptible_timeout() in the wait_for_rdy() function which only returns when the expected condition has been found (but may block indefinitely when the condition never occurs).
Lothar Wa���mann
Signature · 9 lines
___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra���e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch���ftsf���hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | [email protected] ___________________________________________________________
------------------------------------------------------------------------------
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel