diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-05-29 11:41:18 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-12 06:11:55 -0400 |
commit | ffc4d8bc4435918d2fd1e840b0bf985e7b56f0d3 (patch) | |
tree | 99b49fbfa7bc067c987a4773c4ebb2cf3c89f5fe /arch/blackfin/mach-bf537 | |
parent | 79df1b69471b5ea4be8285c9dc6ab05cdf5a85d7 (diff) |
Blackfin: bf548-ezkit/bf537-stamp: add resources for ADXL345/346
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index f56289a66ff2..dfb5036f8a6b 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -607,6 +607,43 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
607 | }; | 607 | }; |
608 | #endif | 608 | #endif |
609 | 609 | ||
610 | #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) | ||
611 | #include <linux/input.h> | ||
612 | #include <linux/spi/adxl34x.h> | ||
613 | static const struct adxl34x_platform_data adxl34x_info = { | ||
614 | .x_axis_offset = 0, | ||
615 | .y_axis_offset = 0, | ||
616 | .z_axis_offset = 0, | ||
617 | .tap_threshold = 0x31, | ||
618 | .tap_duration = 0x10, | ||
619 | .tap_latency = 0x60, | ||
620 | .tap_window = 0xF0, | ||
621 | .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN, | ||
622 | .act_axis_control = 0xFF, | ||
623 | .activity_threshold = 5, | ||
624 | .inactivity_threshold = 3, | ||
625 | .inactivity_time = 4, | ||
626 | .free_fall_threshold = 0x7, | ||
627 | .free_fall_time = 0x20, | ||
628 | .data_rate = 0x8, | ||
629 | .data_range = ADXL_FULL_RES, | ||
630 | |||
631 | .ev_type = EV_ABS, | ||
632 | .ev_code_x = ABS_X, /* EV_REL */ | ||
633 | .ev_code_y = ABS_Y, /* EV_REL */ | ||
634 | .ev_code_z = ABS_Z, /* EV_REL */ | ||
635 | |||
636 | .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */ | ||
637 | .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */ | ||
638 | .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */ | ||
639 | |||
640 | /* .ev_code_ff = KEY_F,*/ /* EV_KEY */ | ||
641 | /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */ | ||
642 | .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK, | ||
643 | .fifo_mode = ADXL_FIFO_STREAM, | ||
644 | }; | ||
645 | #endif | ||
646 | |||
610 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | 647 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) |
611 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | 648 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { |
612 | .enable_dma = 0, | 649 | .enable_dma = 0, |
@@ -1312,6 +1349,13 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
1312 | .platform_data = (void *)&adp5520_pdev_data, | 1349 | .platform_data = (void *)&adp5520_pdev_data, |
1313 | }, | 1350 | }, |
1314 | #endif | 1351 | #endif |
1352 | #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) | ||
1353 | { | ||
1354 | I2C_BOARD_INFO("adxl34x", 0x53), | ||
1355 | .irq = IRQ_PG3, | ||
1356 | .platform_data = (void *)&adxl34x_info, | ||
1357 | }, | ||
1358 | #endif | ||
1315 | }; | 1359 | }; |
1316 | 1360 | ||
1317 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 1361 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |