diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-06 09:36:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-06 11:52:24 -0500 |
commit | 9c196f0f8db928ef9a2a935d86d75a218a7131b1 (patch) | |
tree | e70005e153fd5fe9158e83f62e2b65633c746077 | |
parent | 0831e3e4cf8abcbb772c0cb1eb4406ffcdb974df (diff) |
ARM: iPAQ: convert H3100 IrDA to use generic gpio support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-sa1100/h3600.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/h3600_gpio.h | 9 |
2 files changed, 17 insertions, 3 deletions
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 2b545a4baa08..c53ad6518352 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) | |||
347 | */ | 347 | */ |
348 | static int h3100_irda_set_power(struct device *dev, unsigned int state) | 348 | static int h3100_irda_set_power(struct device *dev, unsigned int state) |
349 | { | 349 | { |
350 | assign_h3100_egpio(IPAQ_EGPIO_IR_ON, state); | 350 | gpio_set_value(H3100_GPIO_IR_ON, state); |
351 | |||
352 | return 0; | 351 | return 0; |
353 | } | 352 | } |
354 | 353 | ||
355 | static void h3100_irda_set_speed(struct device *dev, unsigned int speed) | 354 | static void h3100_irda_set_speed(struct device *dev, unsigned int speed) |
356 | { | 355 | { |
357 | assign_h3100_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000)); | 356 | gpio_set_value(H3100_GPIO_IR_FSEL, !(speed < 4000000)); |
358 | } | 357 | } |
359 | 358 | ||
360 | static struct irda_platform_data h3100_irda_data = { | 359 | static struct irda_platform_data h3100_irda_data = { |
@@ -362,8 +361,14 @@ static struct irda_platform_data h3100_irda_data = { | |||
362 | .set_speed = h3100_irda_set_speed, | 361 | .set_speed = h3100_irda_set_speed, |
363 | }; | 362 | }; |
364 | 363 | ||
364 | static struct gpio_default_state h3100_default_gpio[] = { | ||
365 | { H3100_GPIO_IR_ON, GPIO_MODE_OUT0, "IrDA power" }, | ||
366 | { H3100_GPIO_IR_FSEL, GPIO_MODE_OUT0, "IrDA fsel" }, | ||
367 | }; | ||
368 | |||
365 | static void h3100_mach_init(void) | 369 | static void h3100_mach_init(void) |
366 | { | 370 | { |
371 | h3xxx_init_gpio(h3100_default_gpio, ARRAY_SIZE(h3100_default_gpio)); | ||
367 | h3xxx_mach_init(); | 372 | h3xxx_mach_init(); |
368 | sa11x0_register_irda(&h3100_irda_data); | 373 | sa11x0_register_irda(&h3100_irda_data); |
369 | } | 374 | } |
diff --git a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h index a36ca76d018b..d4d0b22d0193 100644 --- a/arch/arm/mach-sa1100/include/mach/h3600_gpio.h +++ b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h | |||
@@ -39,6 +39,15 @@ | |||
39 | #define GPIO_H3100_IR_ON GPIO_GPIO (8) | 39 | #define GPIO_H3100_IR_ON GPIO_GPIO (8) |
40 | #define GPIO_H3100_IR_FSEL GPIO_GPIO (9) | 40 | #define GPIO_H3100_IR_FSEL GPIO_GPIO (9) |
41 | 41 | ||
42 | /* gpiolib versions of the above */ | ||
43 | #define H3100_GPIO_BT_ON 2 | ||
44 | #define H3100_GPIO_QMUTE 4 | ||
45 | #define H3100_GPIO_LCD_3V_ON 5 | ||
46 | #define H3100_GPIO_AUD_ON 6 | ||
47 | #define H3100_GPIO_AUD_PWR_ON 7 | ||
48 | #define H3100_GPIO_IR_ON 8 | ||
49 | #define H3100_GPIO_IR_FSEL 9 | ||
50 | |||
42 | /* for H3600, audio sample rate clock generator */ | 51 | /* for H3600, audio sample rate clock generator */ |
43 | #define GPIO_H3600_CLK_SET0 GPIO_GPIO (12) | 52 | #define GPIO_H3600_CLK_SET0 GPIO_GPIO (12) |
44 | #define GPIO_H3600_CLK_SET1 GPIO_GPIO (13) | 53 | #define GPIO_H3600_CLK_SET1 GPIO_GPIO (13) |