title: Linux Device Tree GPIO Interrupt
body: <p>I have an I2C accelerometer chip that I am trying to interface to AM335X processor running Linux 3.12 kernel.</p>
  
  <p>I have set up my device tree this way but it doesn't seem to have hooked up the interrupt sources correctly. My driver (<a href="http://www.st.com/web/en/catalog/tools/PF258114" rel="nofollow">http://www.st.com/web/en/catalog/tools/PF258114</a>) does not receive any interrupts.</p>
  
  <pre><code>i2c1: i2c@4802a000 {
          status = "okay";
          pinctrl-names = "default";
          pinctrl-0 = &lt;&amp;i2c1_pins&gt;;
  
          clock-frequency = &lt;100000&gt;;
  
          accel: accel@19 {
                  /* compatible="st,lis3lv02d" */
                  compatible="st,lis2dh";
                  interrupt-parent = &lt;&amp;gpio0&gt;;
                  interrupts = &lt; 22 0x01 &gt;;
                  reg = &lt;0x19&gt;;
          };
  };
  </code></pre>
  
  <p>My chip is at address 19.</p>
  
  <p>My GPIO interrupt line is GPIO 0-22 and it is an active high</p>
  
  <p>When I insmod the driver it starts up and sets up the hardware but does nothing else:</p>
  
  <pre><code># insmod /mnt/rootfs/lis2dh_acc.ko
  [   38.351272] lis2dh_acc accelerometer driver: init
  [   38.362857] lis2dh_acc 1-0019: probe start.
  [   38.367291] lis2dh_acc 1-0019: using default plaform_data
  [   38.382664] lis2dh_acc: hw init start
  [   38.392011] lis2dh_acc: hw init done
  [   38.402053] input: lis2dh_acc as /devices/ocp.2/4802a000.i2c/i2c-1/1-0019/input/input1
  [   38.415506] lis2dh_acc 1-0019: lis2dh_acc: probed
  [   38.429872] i2c-core: driver [lis2dh_acc] using legacy suspend method
  [   38.442815] i2c-core: driver [lis2dh_acc] using legacy resume method
  </code></pre>
  
  <p>I even force a "1" into enable_device:</p>
  
  <p>echo 1 > /sys/devices/ocp.2/4802a000.i2c/i2c-1/1-0019/input/input1/device/enable_device</p>
  
  <p>but still nothing.</p>
  
  <p>Can anybody help me figure out if my device tree is incorrectly set up? or what could be the issue?</p>
  
  <p>Thanks</p>