<?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: Platform data with device tree</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690008#M106887</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeffrey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be useful to check AN5125 Introduction to Device Trees&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/docs/en/application-note/AN5125.pdf" title="http://www.nxp.com/docs/en/application-note/AN5125.pdf"&gt;http://www.nxp.com/docs/en/application-note/AN5125.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;parameters from dts can be passed in probe function&lt;/P&gt;&lt;P&gt;using of_property_read.. function as for example&amp;nbsp; in linux/drivers/gpio/gpio-pcf857x.c&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/drivers/gpio/gpio-pcf857x.c?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/drivers/gpio/gpio-pcf857x.c?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>Tue, 01 Aug 2017 23:37:04 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2017-08-01T23:37:04Z</dc:date>
    <item>
      <title>Platform data with device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690007#M106886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm in the process of upgrading from 3.0.35 to 4.1.15. &amp;nbsp;I am new to the world of device trees, etc.. &amp;nbsp;I have a gpio expander chip pca9502 that I used to configure with platform data in a board configuration file, like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const char* gpio_names[PCA9502_NUM_GPIO] = { "program",&lt;BR /&gt; NULL,&lt;BR /&gt; "soft_reset",&lt;BR /&gt; "flash_en",&lt;BR /&gt; "I0_L4N_T0_12",&lt;BR /&gt; "done",&lt;BR /&gt; "init_b",&lt;BR /&gt; "cpudone" };&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;static struct pca9502_platform_data pca9502_i2c_gpio_data = {&lt;BR /&gt; .num_gpio = PCA9502_NUM_GPIO,&lt;BR /&gt; .gpio_base = -1,&lt;BR /&gt; .names = gpio_names&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have moved to a device tree and have the following in my dts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pca9502: pca9502@49 {&lt;BR /&gt; compatible = "nxp,pca9502";&lt;BR /&gt; reg = &amp;lt;0x49&amp;gt;;&lt;BR /&gt; gpio-controller;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am not sure about is now I pass platform data to the driver, now that I am using the device tree or if that is even possible. &amp;nbsp;Mainly I need .names for the gpios, and that used to get passed in platform data. &amp;nbsp;I've tried adding&amp;nbsp;&lt;/P&gt;&lt;P&gt;gpio-line-names property to my controller in the dts, but that doesn't seem to work or I misunderstand the kernel documentation in regard to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gpios work fine other than they no longer have the aliased names in sysfs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to pass platform data without the old board descriptors in the newer kernel? &amp;nbsp;Otherwise is there a way to alias the names for controllers gpio lines like I used to be able to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 20:34:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690007#M106886</guid>
      <dc:creator>jeffrey_coffman</dc:creator>
      <dc:date>2017-08-01T20:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Platform data with device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690008#M106887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeffrey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be useful to check AN5125 Introduction to Device Trees&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/docs/en/application-note/AN5125.pdf" title="http://www.nxp.com/docs/en/application-note/AN5125.pdf"&gt;http://www.nxp.com/docs/en/application-note/AN5125.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;parameters from dts can be passed in probe function&lt;/P&gt;&lt;P&gt;using of_property_read.. function as for example&amp;nbsp; in linux/drivers/gpio/gpio-pcf857x.c&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/drivers/gpio/gpio-pcf857x.c?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/drivers/gpio/gpio-pcf857x.c?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>Tue, 01 Aug 2017 23:37:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690008#M106887</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-08-01T23:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Platform data with device tree</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690009#M106888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked perfectly for me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 23:41:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Platform-data-with-device-tree/m-p/690009#M106888</guid>
      <dc:creator>jeffrey_coffman</dc:creator>
      <dc:date>2017-08-01T23:41:04Z</dc:date>
    </item>
  </channel>
</rss>

