<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic mma8451 interrupt mode in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/mma8451-interrupt-mode/m-p/155732#M2191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On our customer board, we use mma8451(g-sensor) to do something.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Linux BSP the driver is running with &lt;STRONG&gt;polling mode&lt;/STRONG&gt;, I think it is less&amp;nbsp;&lt;SPAN&gt;efficiency, so I want to change it to interrupt mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I set the register into interrupt mode, but I can't get interrupt when I move the sensor module, Is there any one had done this?&lt;/P&gt;&lt;P&gt;Attachment file is my driver.&lt;/P&gt;&lt;P&gt;In the board level file, I set this:&lt;/P&gt;&lt;P&gt;static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {&lt;BR /&gt; {&lt;BR /&gt; .type = "mma8451",&lt;BR /&gt; .addr = 0x1C,&lt;BR /&gt; .irq = gpio_to_irq(MX53_SMD_ACCL_INT1_IN), //+++++add by Jay for g-sensor interrupt mode&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;//+++++add by Jay for g-sensor interrupt mode to get data&lt;BR /&gt; gpio_request(MX53_SMD_ACCL_INT1_IN, "gsensor-irq");&lt;BR /&gt; msleep(5);&lt;BR /&gt; gpio_direction_input(MX53_SMD_ACCL_INT1_IN);&lt;BR /&gt; //-----end add&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336819"&gt;207-mxc_mma8451.c&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2012 07:57:04 GMT</pubDate>
    <dc:creator>JayZhang</dc:creator>
    <dc:date>2012-04-24T07:57:04Z</dc:date>
    <item>
      <title>mma8451 interrupt mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/mma8451-interrupt-mode/m-p/155732#M2191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On our customer board, we use mma8451(g-sensor) to do something.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Linux BSP the driver is running with &lt;STRONG&gt;polling mode&lt;/STRONG&gt;, I think it is less&amp;nbsp;&lt;SPAN&gt;efficiency, so I want to change it to interrupt mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I set the register into interrupt mode, but I can't get interrupt when I move the sensor module, Is there any one had done this?&lt;/P&gt;&lt;P&gt;Attachment file is my driver.&lt;/P&gt;&lt;P&gt;In the board level file, I set this:&lt;/P&gt;&lt;P&gt;static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {&lt;BR /&gt; {&lt;BR /&gt; .type = "mma8451",&lt;BR /&gt; .addr = 0x1C,&lt;BR /&gt; .irq = gpio_to_irq(MX53_SMD_ACCL_INT1_IN), //+++++add by Jay for g-sensor interrupt mode&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;//+++++add by Jay for g-sensor interrupt mode to get data&lt;BR /&gt; gpio_request(MX53_SMD_ACCL_INT1_IN, "gsensor-irq");&lt;BR /&gt; msleep(5);&lt;BR /&gt; gpio_direction_input(MX53_SMD_ACCL_INT1_IN);&lt;BR /&gt; //-----end add&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336819"&gt;207-mxc_mma8451.c&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 07:57:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/mma8451-interrupt-mode/m-p/155732#M2191</guid>
      <dc:creator>JayZhang</dc:creator>
      <dc:date>2012-04-24T07:57:04Z</dc:date>
    </item>
  </channel>
</rss>

