diff options
author | Tony SIM <chinyeow.sim.xt@renesas.com> | 2010-12-07 04:12:14 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-12-08 02:11:17 -0500 |
commit | 80f1dc7cc9341b160beb9c833edc1cd131f45a7f (patch) | |
tree | ed8887c123bbb85fb36b15afa62bb4b317796a28 /arch/arm/mach-shmobile/board-mackerel.c | |
parent | 1a44d72a4058f870c305a23aa5cbc4cacb6758ea (diff) |
ARM: mach-shmobile: mackerel: Add Accelerometer sensor support
Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index cf3e660d8e70..a0caa9e39c5a 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -420,6 +420,16 @@ static struct i2c_board_info i2c0_devices[] = { | |||
420 | }, | 420 | }, |
421 | }; | 421 | }; |
422 | 422 | ||
423 | #define IRQ21 evt2irq(0x32a0) | ||
424 | |||
425 | static struct i2c_board_info i2c1_devices[] = { | ||
426 | /* Accelerometer */ | ||
427 | { | ||
428 | I2C_BOARD_INFO("adxl34x", 0x53), | ||
429 | .irq = IRQ21, | ||
430 | }, | ||
431 | }; | ||
432 | |||
423 | static struct map_desc mackerel_io_desc[] __initdata = { | 433 | static struct map_desc mackerel_io_desc[] __initdata = { |
424 | /* create a 1:1 entity map for 0xe6xxxxxx | 434 | /* create a 1:1 entity map for 0xe6xxxxxx |
425 | * used by CPGA, INTC and PFC. | 435 | * used by CPGA, INTC and PFC. |
@@ -515,9 +525,14 @@ static void __init mackerel_init(void) | |||
515 | 525 | ||
516 | intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */ | 526 | intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */ |
517 | 527 | ||
528 | /* enable Accelerometer */ | ||
529 | gpio_request(GPIO_FN_IRQ21, NULL); | ||
530 | set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); | ||
518 | 531 | ||
519 | i2c_register_board_info(0, i2c0_devices, | 532 | i2c_register_board_info(0, i2c0_devices, |
520 | ARRAY_SIZE(i2c0_devices)); | 533 | ARRAY_SIZE(i2c0_devices)); |
534 | i2c_register_board_info(1, i2c1_devices, | ||
535 | ARRAY_SIZE(i2c1_devices)); | ||
521 | 536 | ||
522 | sh7372_add_standard_devices(); | 537 | sh7372_add_standard_devices(); |
523 | 538 | ||