From ac2536109849217a71510b6ded813e91629e88f6 Mon Sep 17 00:00:00 2001 From: Ian Molton Date: Thu, 10 Jul 2008 20:17:27 +0100 Subject: Support for LCD on e740 e750 e400 and e800 e-series PDAs Signed-off-by: Ian Molton --- arch/arm/mach-pxa/Kconfig | 3 + arch/arm/mach-pxa/Makefile | 4 ++ arch/arm/mach-pxa/e400_lcd.c | 56 +++++++++++++++ arch/arm/mach-pxa/e740_lcd.c | 123 +++++++++++++++++++++++++++++++++ arch/arm/mach-pxa/e750_lcd.c | 109 +++++++++++++++++++++++++++++ arch/arm/mach-pxa/e800_lcd.c | 159 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 454 insertions(+) create mode 100644 arch/arm/mach-pxa/e400_lcd.c create mode 100644 arch/arm/mach-pxa/e740_lcd.c create mode 100644 arch/arm/mach-pxa/e750_lcd.c create mode 100644 arch/arm/mach-pxa/e800_lcd.c diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 0c96229a2db4..55e8d2f10dd3 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -136,6 +136,7 @@ config MACH_E740 bool "Toshiba e740" default y depends on ARCH_PXA_ESERIES + select FB_W100 help Say Y here if you intend to run this kernel on a Toshiba e740 family PDA. @@ -144,6 +145,7 @@ config MACH_E750 bool "Toshiba e750" default y depends on ARCH_PXA_ESERIES + select FB_W100 help Say Y here if you intend to run this kernel on a Toshiba e750 family PDA. @@ -160,6 +162,7 @@ config MACH_E800 bool "Toshiba e800" default y depends on ARCH_PXA_ESERIES + select FB_W100 help Say Y here if you intend to run this kernel on a Toshiba e800 family PDA. diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 9d4c3931d0e9..f2b77ef43f2c 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -37,6 +37,10 @@ obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o +obj-$(CONFIG_MACH_E740) += e740_lcd.o +obj-$(CONFIG_MACH_E750) += e750_lcd.o +obj-$(CONFIG_MACH_E400) += e400_lcd.o +obj-$(CONFIG_MACH_E800) += e800_lcd.o ifeq ($(CONFIG_MACH_ZYLONITE),y) obj-y += zylonite.o diff --git a/arch/arm/mach-pxa/e400_lcd.c b/arch/arm/mach-pxa/e400_lcd.c new file mode 100644 index 000000000000..16c023630626 --- /dev/null +++ b/arch/arm/mach-pxa/e400_lcd.c @@ -0,0 +1,56 @@ +/* + * e400_lcd.c + * + * (c) 2005 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include + +#include +#include +#include + +static struct pxafb_mode_info e400_pxafb_mode_info = { + .pixclock = 140703, + .xres = 240, + .yres = 320, + .bpp = 16, + .hsync_len = 4, + .left_margin = 28, + .right_margin = 8, + .vsync_len = 3, + .upper_margin = 5, + .lower_margin = 6, + .sync = 0, +}; + +static struct pxafb_mach_info e400_pxafb_mach_info = { + .modes = &e400_pxafb_mode_info, + .num_modes = 1, + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, + .lccr3 = 0, + .pxafb_backlight_power = NULL, +}; + +static int __init e400_lcd_init(void) +{ + if (!machine_is_e400()) + return -ENODEV; + + set_pxa_fb_info(&e400_pxafb_mach_info); + return 0; +} + +module_init(e400_lcd_init); + +MODULE_AUTHOR("Ian Molton "); +MODULE_DESCRIPTION("e400 lcd driver"); +MODULE_LICENSE("GPLv2"); + diff --git a/arch/arm/mach-pxa/e740_lcd.c b/arch/arm/mach-pxa/e740_lcd.c new file mode 100644 index 000000000000..26bd599af178 --- /dev/null +++ b/arch/arm/mach-pxa/e740_lcd.c @@ -0,0 +1,123 @@ +/* e740_lcd.c + * + * This file contains the definitions for the LCD timings and functions + * to control the LCD power / frontlighting via the w100fb driver. + * + * (c) 2005 Ian Molton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include + +#include + +#include