ADXL345: which interrupt to use?

I'm trying to get the ADXL345 accelerometer working with the adxl345
input kernel driver, but I'm confused about what interrupt number to
specify for it

I'm using a BeagleBone Green with the Grove 3-Axis Digital
Accelerometer (SKU: 101020054):

The BBG is running Linux 4.5-rc4 built with Robert's linux-dev scripts:

For reference, this is the ADXL345 userspace library from Seeed:

I'm using this information from the Analog Devices wiki:
ADXL345 Input 3-Axis Digital Accelerometer Linux Driver:

I created this Device Tree Overlay based on that wiki page:

However, I am uncertain what value to use for "interrupts":

            adxl345@0 {
                compatible = "adi,adxl345";
                reg = <0x53>;
                interrupt-parent = <&gpio3>;
                interrupts = <19 0x0>;

I load the overlay and driver as shown in this Gist:

This line then appears in /proc/interrupts:
145: 0 481ae000.gpio 19 Level 2-0053

I run evtest for /dev/input/event2 (ADXL34x accelerometer), but no
events ever occur.

Any ideas as to how I can troubleshoot further?


Here's how i've done this:

Define a pinmux:

BONE_P9_23 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a1.gpio1_17 */

Then in the i2c device node:

pinmux reference:

pinctrl-names = "default";
pinctrl-0 = <&edt_ft5306_ts_pins>;

Then the irq stuff:

interrupt-parent = <&gpio1>; /* gpio1_17 is on &gpio1 */
interrupts = <17 0>; /* 17 fro gpio1_17, 0 is active high */


and just looked at the board.. With only i2c connected by default,
int1/2 only on the pcb... yeah. You'd have to remove the irq


Ah, thanks! I didn't notice the INT1 and INT2 pads on the board until
you mentioned. I will try to wire it up. A bit awkward for Grove,
but I don't think I can get evtest to output anything otherwise.
Although I am wondering if there is a way to poll /dev/input/event2.