diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-05-11 11:59:51 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:15:15 +0200 |
commit | 917efd87812b5785c634f572df0fba6b4cc92bde (patch) | |
tree | 3a66932603acd19f678e1ce65783bc03e9f1cbb1 /arch/arm/mach-ux500/board-u5500.c | |
parent | e29d96cb71b58fe557466e73fd8b202b369ffcb6 (diff) |
board-u5500.c : Add platform data for LSM303DLH sensor
Adding platform specific data for LSM303DLH sensor chip.
ST Ericsson ID : WP 257105
Signed-off-by: Chethan Krishna N <chethan.krishna@stericsson.com>
Change-Id: I0dca349ebc48d4cc556833c5e40c799de869f77e
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/22480
Reviewed-by: Chethan Krishna N <chethan.krishna@stericsson.com>
Tested-by: Chethan Krishna N <chethan.krishna@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Conflicts:
arch/arm/mach-ux500/board-u5500.c
Diffstat (limited to 'arch/arm/mach-ux500/board-u5500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-u5500.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 69f7b5471a1..3636289da07 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c @@ -18,6 +18,7 @@ #include <linux/led-lm3530.h> #include <../../../drivers/staging/ste_rmi4/synaptics_i2c_rmi4.h> #include <linux/input/matrix_keypad.h> +#include <linux/lsm303dlh.h> #include <video/av8100.h> @@ -120,6 +121,21 @@ static pin_cfg_t u5500_pins[] = { }; /* + * LSM303DLH + */ + +static struct lsm303dlh_platform_data __initdata lsm303dlh_pdata = { + .name_a = "lsm303dlh.0", + .name_m = "lsm303dlh.1", + .axis_map_x = 1, + .axis_map_y = 0, + .axis_map_z = 2, + .negative_x = 1, + .negative_y = 1, + .negative_z = 1, +}; + +/* * Touchscreen */ static struct synaptics_rmi4_platform_data rmi4_i2c_platformdata = { @@ -204,6 +220,16 @@ static struct i2c_board_info __initdata u5500_i2c1_devices[] = { static struct i2c_board_info __initdata u5500_i2c2_devices[] = { { + /* LSM303DLH Accelerometer */ + I2C_BOARD_INFO("lsm303dlh_a", 0x19), + .platform_data = &lsm303dlh_pdata, + }, + { + /* LSM303DLH Magnetometer */ + I2C_BOARD_INFO("lsm303dlh_m", 0x1E), + .platform_data = &lsm303dlh_pdata, + }, + { /* Backlight */ I2C_BOARD_INFO("lm3530-led", 0x36), .platform_data = &u5500_als_platform_data, |