From: David Brownell <dbrownell@users.sourceforge.net>
This updates most of the OMAP drivers which are in mainline to
switch to using the cross-platform GPIO calls instead of the
older OMAP-specific ones.
This is all fairly brainless/obvious stuff. Probably the
most interesting bit is to observe that the omap-keypad
code seems to now have a portable core that could work with
non-OMAP matrix keypads. (That would improve with hardware
IRQ debouncing enabled, of course...)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
---
By "most", I mean it omits three drivers I know have patches
pending for the initial 2.6.28 merge window; their turn will
come later. (And then there's arch/arm/*omap*/*c ... )
drivers/input/keyboard/omap-keypad.c | 27 ++++-----
drivers/mtd/nand/ams-delta.c | 4 -
drivers/video/omap/lcd_inn1610.c | 22 +++----
drivers/video/omap/lcd_osk.c | 10 +--
drivers/video/omap/lcd_sx1.c | 97 +++++++++++++++------------------
5 files changed, 74 insertions(+), 86 deletions(-)
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -72,12 +72,9 @@ static unsigned int *col_gpios;
static void set_col_gpio_val(struct omap_kp *omap_kp, u8 value)
{
int col;
- for (col = 0; col < omap_kp->cols; col++) {
- if (value & (1 << col))
- omap_set_gpio_dataout(col_gpios[col], 1);
- else
- omap_set_gpio_dataout(col_gpios[col], 0);
- }
+
+ for (col = 0; col < omap_kp->cols; col++)
+ gpio_set_value(col_gpios[col], value & (1 << col));
}
static u8 get_row_gpio_val(struct omap_kp *omap_kp)
@@ -86,7 +83,7 @@ static u8 get_row_gpio_val(struct omap_k
u8 value = 0;
for (row = 0; row < omap_kp->rows; row++) {
- if (omap_get_gpio_datain(row_gpios[row]))
+ if ...