<?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>i.MX ProcessorsのトピックRe: How to access SPI from reboot.c file</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726371#M112957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sir,&lt;/P&gt;&lt;P&gt;Thanks for your quick response, but I still not able to access SPI from reboot.c kernel file. I want to access the SPI from kernel's file "reboot.c" directly, not from user space. So what should I have to do? please guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function from where I want to access SPI is shown below,&lt;/P&gt;&lt;DIV&gt;/**&lt;BR /&gt;&amp;nbsp;*&amp;nbsp;kernel_power_off - power_off the system&lt;BR /&gt;&amp;nbsp;*&lt;BR /&gt;&amp;nbsp;*&amp;nbsp;Shutdown everything and perform a clean system power_off.&lt;BR /&gt;&amp;nbsp;*/&lt;/DIV&gt;&lt;DIV&gt;void kernel_power_off(void)&lt;BR /&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;kernel_shutdown_prepare(SYSTEM_POWER_OFF);&lt;BR /&gt;&amp;nbsp;if (pm_power_off_prepare)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;pm_power_off_prepare();&lt;BR /&gt;&amp;nbsp;migrate_to_reboot_cpu();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;syscore_shutdown();&lt;BR /&gt;&amp;nbsp;pr_emerg("Power down");&lt;BR /&gt;&amp;nbsp;kmsg_dump(KMSG_DUMP_POWEROFF);&lt;BR /&gt;&amp;nbsp;machine_power_off();&lt;BR /&gt;}&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2017 09:53:21 GMT</pubDate>
    <dc:creator>lalabhaidesai</dc:creator>
    <dc:date>2017-11-23T09:53:21Z</dc:date>
    <item>
      <title>How to access SPI from reboot.c file</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726369#M112955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using i.MX6UL and i want to access the SPI from&amp;nbsp;"void kernel_power_off(void)" function before shutdown process. so please guide me that how can i access SPI from this function which is in reboot.c file. I want to send some data to my slave device using SPI from this function. I have accessed SPI from user space using spidev and it is working fine. But i could not able to access it from reboot.c file so please guide me ASAP. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 05:55:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726369#M112955</guid>
      <dc:creator>lalabhaidesai</dc:creator>
      <dc:date>2017-11-22T05:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to access SPI from reboot.c file</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726370#M112956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lalabhai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please refer to spi ioctls described in linux/Documentation/spi/spidev&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/Documentation/spi/spidev?h=imx_4.1.15_2.0.0_ga&amp;amp;id=rel_imx_4.1.15_2.0.0_ga" title="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/Documentation/spi/spidev?h=imx_4.1.15_2.0.0_ga&amp;amp;id=rel_imx_4.1.15_2.0.0_ga"&gt;linux-imx.git - i.MX Linux Kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 10:43:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726370#M112956</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-11-22T10:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to access SPI from reboot.c file</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726371#M112957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sir,&lt;/P&gt;&lt;P&gt;Thanks for your quick response, but I still not able to access SPI from reboot.c kernel file. I want to access the SPI from kernel's file "reboot.c" directly, not from user space. So what should I have to do? please guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function from where I want to access SPI is shown below,&lt;/P&gt;&lt;DIV&gt;/**&lt;BR /&gt;&amp;nbsp;*&amp;nbsp;kernel_power_off - power_off the system&lt;BR /&gt;&amp;nbsp;*&lt;BR /&gt;&amp;nbsp;*&amp;nbsp;Shutdown everything and perform a clean system power_off.&lt;BR /&gt;&amp;nbsp;*/&lt;/DIV&gt;&lt;DIV&gt;void kernel_power_off(void)&lt;BR /&gt;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;kernel_shutdown_prepare(SYSTEM_POWER_OFF);&lt;BR /&gt;&amp;nbsp;if (pm_power_off_prepare)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;pm_power_off_prepare();&lt;BR /&gt;&amp;nbsp;migrate_to_reboot_cpu();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;syscore_shutdown();&lt;BR /&gt;&amp;nbsp;pr_emerg("Power down");&lt;BR /&gt;&amp;nbsp;kmsg_dump(KMSG_DUMP_POWEROFF);&lt;BR /&gt;&amp;nbsp;machine_power_off();&lt;BR /&gt;}&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 09:53:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-access-SPI-from-reboot-c-file/m-p/726371#M112957</guid>
      <dc:creator>lalabhaidesai</dc:creator>
      <dc:date>2017-11-23T09:53:21Z</dc:date>
    </item>
  </channel>
</rss>

