[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1232877301524-git-send-email-jayakumar.lkml@gmail.com>
Date: Sun, 25 Jan 2009 17:54:49 +0800
From: Jaya Kumar <jayakumar.lkml@...il.com>
To: jayakumar.lkml@...il.com
Cc: David Brownell <david-b@...bell.net>,
Eric Miao <eric.miao@...vell.com>,
Paulius Zaleckas <paulius.zaleckas@...tonika.lt>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Sam Ravnborg <sam@...nborg.org>,
linux-arm-kernel@...ts.arm.linux.org.uk,
linux-fbdev-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, linux-embedded@...r.kernel.org,
Jaya Kumar <jayakumar.lkml@...il.com>
Subject: [RFC 2.6.28 3/3] mach-pxa: use batch set/get in am300epd
This patch to am300epd uses the batch gpiolib set/get API in order
to significantly improve performance when transferring framebuffer
data.
Cc: David Brownell <david-b@...bell.net>
Cc: Eric Miao <eric.miao@...vell.com>
Cc: Paulius Zaleckas <paulius.zaleckas@...tonika.lt>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Sam Ravnborg <sam@...nborg.org>
Cc: linux-arm-kernel@...ts.arm.linux.org.uk
Cc: linux-fbdev-devel@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org
Cc: linux-embedded@...r.kernel.org
Signed-off-by: Jaya Kumar <jayakumar.lkml@...il.com>
---
arch/arm/mach-pxa/am300epd.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c
index 4bd10a1..237e3be 100644
--- a/arch/arm/mach-pxa/am300epd.c
+++ b/arch/arm/mach-pxa/am300epd.c
@@ -187,24 +187,25 @@ static void am300_cleanup(struct broadsheetfb_par *par)
static u16 am300_get_hdb(struct broadsheetfb_par *par)
{
- u16 res = 0;
- int i;
-
- for (i = 0; i <= (DB15_GPIO_PIN - DB0_GPIO_PIN) ; i++)
- res |= (gpio_get_value(DB0_GPIO_PIN + i)) ? (1 << i) : 0;
+ int err;
+ u32 val;
- return res;
+ err = gpio_get_batch(DB0_GPIO_PIN, 0xFFFF, &val);
+ if (err) {
+ dev_err(&am300_device->dev, "get failed: %d\n", err);
+ return 0;
+ }
+ return (u16) val;
}
static void am300_set_hdb(struct broadsheetfb_par *par, u16 data)
{
- int i;
-
- for (i = 0; i <= (DB15_GPIO_PIN - DB0_GPIO_PIN) ; i++)
- gpio_set_value(DB0_GPIO_PIN + i, (data >> i) & 0x01);
+ int err;
+ err = gpio_set_batch(DB0_GPIO_PIN, 0xFFFF, data);
+ if (err)
+ dev_err(&am300_device->dev, "set failed: %d\n", err);
}
-
static void am300_set_ctl(struct broadsheetfb_par *par, unsigned char bit,
u8 state)
{
--
1.5.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists