]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>
Fri, 14 Sep 2012 09:14:29 +0000 (18:14 +0900)
committerSimon Horman <horms@verge.net.au>
Tue, 18 Sep 2012 01:35:04 +0000 (10:35 +0900)
This patch enables three-axis digital accelerometer ADXL345.
Test:
  sudo cat /dev/input/event2
then tip up the board. You get something from /dev/input/event2.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
arch/arm/configs/kzm9g_defconfig
arch/arm/mach-shmobile/board-kzm9g.c

index 2aaa2ff0bc16b8162d6d3039899f31609b568bb1..83047e0ecfb2f1f1f0ce55d1c22c0c822714af65 100644 (file)
@@ -73,6 +73,8 @@ CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_MOUSE is not set
 CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_TOUCHSCREEN_ST1232=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_ADXL34X=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_SH_SCI=y
 CONFIG_SERIAL_SH_SCI_NR_UARTS=9
index 7965012ccea576b7a10992315e7746970c7ed460..72f75e280c3921e351478ca320d1783b72f13a90 100644 (file)
@@ -563,6 +563,10 @@ static struct i2c_board_info i2c0_devices[] = {
                I2C_BOARD_INFO("ak8975", 0x0c),
                .irq = intcs_evt2irq(0x3380), /* IRQ28 */
        },
+       {
+               I2C_BOARD_INFO("adxl34x", 0x1d),
+               .irq = intcs_evt2irq(0x3340), /* IRQ26 */
+       },
 };
 
 static struct i2c_board_info i2c1_devices[] = {