diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-06 09:22:23 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-06 11:52:24 -0500 |
commit | a5d176a19138eef45e4c7c80a8d3a7c14c8aec53 (patch) | |
tree | 0ddd33822014c30a53a1da3ae4f469703404f8f6 /arch/arm/mach-sa1100 | |
parent | 898e810eadb16670c800b3279800bda3a822c6d7 (diff) |
ARM: iPAQ: separate IrDA machine specifics
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r-- | arch/arm/mach-sa1100/h3600.c | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index a91abd35b8be..c51432bad46d 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c | |||
@@ -80,30 +80,9 @@ static struct resource h3xxx_flash_resource = { | |||
80 | .flags = IORESOURCE_MEM, | 80 | .flags = IORESOURCE_MEM, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | /* | ||
84 | * This turns the IRDA power on or off on the Compaq H3600 | ||
85 | */ | ||
86 | static int h3600_irda_set_power(struct device *dev, unsigned int state) | ||
87 | { | ||
88 | assign_h3600_egpio( IPAQ_EGPIO_IR_ON, state ); | ||
89 | |||
90 | return 0; | ||
91 | } | ||
92 | |||
93 | static void h3600_irda_set_speed(struct device *dev, unsigned int speed) | ||
94 | { | ||
95 | assign_h3600_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000)); | ||
96 | } | ||
97 | |||
98 | static struct irda_platform_data h3600_irda_data = { | ||
99 | .set_power = h3600_irda_set_power, | ||
100 | .set_speed = h3600_irda_set_speed, | ||
101 | }; | ||
102 | |||
103 | static void h3xxx_mach_init(void) | 83 | static void h3xxx_mach_init(void) |
104 | { | 84 | { |
105 | sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1); | 85 | sa11x0_register_mtd(&h3xxx_flash_data, &h3xxx_flash_resource, 1); |
106 | sa11x0_register_irda(&h3600_irda_data); | ||
107 | } | 86 | } |
108 | 87 | ||
109 | /* | 88 | /* |
@@ -321,9 +300,30 @@ static void __init h3100_map_io(void) | |||
321 | assign_h3600_egpio = h3100_control_egpio; | 300 | assign_h3600_egpio = h3100_control_egpio; |
322 | } | 301 | } |
323 | 302 | ||
303 | /* | ||
304 | * This turns the IRDA power on or off on the Compaq H3100 | ||
305 | */ | ||
306 | static int h3100_irda_set_power(struct device *dev, unsigned int state) | ||
307 | { | ||
308 | assign_h3100_egpio(IPAQ_EGPIO_IR_ON, state); | ||
309 | |||
310 | return 0; | ||
311 | } | ||
312 | |||
313 | static void h3100_irda_set_speed(struct device *dev, unsigned int speed) | ||
314 | { | ||
315 | assign_h3100_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000)); | ||
316 | } | ||
317 | |||
318 | static struct irda_platform_data h3100_irda_data = { | ||
319 | .set_power = h3100_irda_set_power, | ||
320 | .set_speed = h3100_irda_set_speed, | ||
321 | }; | ||
322 | |||
324 | static void h3100_mach_init(void) | 323 | static void h3100_mach_init(void) |
325 | { | 324 | { |
326 | h3xxx_mach_init(); | 325 | h3xxx_mach_init(); |
326 | sa11x0_register_irda(&h3100_irda_data); | ||
327 | } | 327 | } |
328 | 328 | ||
329 | MACHINE_START(H3100, "Compaq iPAQ H3100") | 329 | MACHINE_START(H3100, "Compaq iPAQ H3100") |
@@ -423,9 +423,29 @@ static void __init h3600_map_io(void) | |||
423 | assign_h3600_egpio = h3600_control_egpio; | 423 | assign_h3600_egpio = h3600_control_egpio; |
424 | } | 424 | } |
425 | 425 | ||
426 | /* | ||
427 | * This turns the IRDA power on or off on the Compaq H3600 | ||
428 | */ | ||
429 | static int h3600_irda_set_power(struct device *dev, unsigned int state) | ||
430 | { | ||
431 | assign_h3600_egpio(IPAQ_EGPIO_IR_ON, state); | ||
432 | return 0; | ||
433 | } | ||
434 | |||
435 | static void h3600_irda_set_speed(struct device *dev, unsigned int speed) | ||
436 | { | ||
437 | assign_h3600_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000)); | ||
438 | } | ||
439 | |||
440 | static struct irda_platform_data h3600_irda_data = { | ||
441 | .set_power = h3600_irda_set_power, | ||
442 | .set_speed = h3600_irda_set_speed, | ||
443 | }; | ||
444 | |||
426 | static void h3600_mach_init(void) | 445 | static void h3600_mach_init(void) |
427 | { | 446 | { |
428 | h3xxx_mach_init(); | 447 | h3xxx_mach_init(); |
448 | sa11x0_register_irda(&h3600_irda_data); | ||
429 | } | 449 | } |
430 | 450 | ||
431 | MACHINE_START(H3600, "Compaq iPAQ H3600") | 451 | MACHINE_START(H3600, "Compaq iPAQ H3600") |