summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/h3600.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-10-06 14:36:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-06 16:52:24 +0000
commit9c196f0f8db928ef9a2a935d86d75a218a7131b1 (patch)
treee70005e153fd5fe9158e83f62e2b65633c746077 /arch/arm/mach-sa1100/h3600.c
parent0831e3e4cf8abcbb772c0cb1eb4406ffcdb974df (diff)
ARM: iPAQ: convert H3100 IrDA to use generic gpio support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/h3600.c')
-rw-r--r--arch/arm/mach-sa1100/h3600.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 2b545a4baa0..c53ad651835 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -347,14 +347,13 @@ static void __init h3100_map_io(void)
*/
static int h3100_irda_set_power(struct device *dev, unsigned int state)
{
- assign_h3100_egpio(IPAQ_EGPIO_IR_ON, state);
-
+ gpio_set_value(H3100_GPIO_IR_ON, state);
return 0;
}
static void h3100_irda_set_speed(struct device *dev, unsigned int speed)
{
- assign_h3100_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000));
+ gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000));
}
static struct irda_platform_data h3100_irda_data = {
@@ -362,8 +361,14 @@ static struct irda_platform_data h3100_irda_data = {
.set_speed = h3100_irda_set_speed,
};
+static struct gpio_default_state h3100_default_gpio[] = {
+ { H3100_GPIO_IR_ON, GPIO_MODE_OUT0, "IrDA power" },
+ { H3100_GPIO_IR_FSEL, GPIO_MODE_OUT0, "IrDA fsel" },
+};
+
static void h3100_mach_init(void)
{
+ h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio));
h3xxx_mach_init();
sa11x0_register_irda(&h3100_irda_data);
}