From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaya Kumar Subject: [RFC 2.6.26-rc9 3/5] am200epd: convert to shared fb and use gpio api Date: Sun, 20 Jul 2008 02:10:31 -0400 Message-ID: <1216534233-26674-4-git-send-email-jayakumar.lkml@gmail.com> References: <1216534233-26674-1-git-send-email-jayakumar.lkml@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1KKT0r-0001ms-Tp for linux-fbdev-devel@lists.sourceforge.net; Sun, 20 Jul 2008 00:07:22 -0700 Received: from wf-out-1314.google.com ([209.85.200.168]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1KKT0n-0008Gs-GR for linux-fbdev-devel@lists.sourceforge.net; Sun, 20 Jul 2008 00:07:20 -0700 Received: by wf-out-1314.google.com with SMTP id 27so979630wfd.4 for ; Sun, 20 Jul 2008 00:07:17 -0700 (PDT) In-Reply-To: <1216534233-26674-1-git-send-email-jayakumar.lkml@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: ymiao3@marvell.com Cc: Jaya Kumar , linux-fbdev-devel@lists.sourceforge.net, linux-arm-kernel@lists.arm.linux.org.uk The original am200epd driver was designed with bad assumptions. It manipulated GPSR/GPLR registers directly. It relied on direct access to the pxa LCDC registers which have since conflicted with commit ce4fb7b892a6d6c6a0f87366b26fd834d2923dd7 . This patch moves it into mach-pxa and overhauls it to use pxafb's fb. It now uses the generic GPIO api. Signed-off-by: Jaya Kumar --- arch/arm/mach-pxa/Kconfig | 3 + arch/arm/mach-pxa/Makefile | 1 + arch/arm/mach-pxa/am200epd.c | 326 ++++++++++++++++++++++++++++++++++++++++++ drivers/video/Kconfig | 13 -- drivers/video/Makefile | 1 - drivers/video/am200epd.c | 295 -------------------------------------- 6 files changed, 330 insertions(+), 309 deletions(-) create mode 100644 arch/arm/mach-pxa/am200epd.c delete mode 100644 drivers/video/am200epd.c diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 3e28521..945014e 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -243,6 +243,9 @@ config PCM990_DISPLAY_NONE endchoice +config MACH_AM200EPD + depends on MACH_GUMSTIX_F + bool "Enable AM200EPD board support" config PXA_EZX bool "Motorola EZX Platform" diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 5220a5c..618fe96 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_CPU_PXA320) += pxa320.o # Specific board support obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o +obj-$(CONFIG_MACH_AM200EPD) += am200epd.o obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c new file mode 100644 index 0000000..87e9fa8 --- /dev/null +++ b/arch/arm/mach-pxa/am200epd.c @@ -0,0 +1,326 @@ +/* + * am200epd.c -- Platform device for AM200 EPD kit + * + * Copyright (C) 2008, Jaya Kumar + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive for + * more details. + * + * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven. + * + * This work was made possible by help and equipment support from E-Ink + * Corporation. http://support.eink.com/community + * + * This driver is written to be used with the Metronome display controller. + * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600 + * Vizplex EPD on a Gumstix board using the Lyre interface board. + * + */ + +#define DEBUG 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include