From: Ian Molton Date: Thu, 10 Jul 2008 19:17:27 +0000 (+0100) Subject: Support for LCD on e740 e750 e400 and e800 e-series PDAs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac2536109849217a71510b6ded813e91629e88f6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Support for LCD on e740 e750 e400 and e800 e-series PDAs Signed-off-by: Ian Molton --- 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