<?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>PowerQUICC Processorsのトピックlinux gpio driver can't export GPIO on mpc8308</title>
    <link>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640514#M1900</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use linux GPIO driver to handle one of the GPIO pins of mpc8308 processor as output. so I enabled the GPIO driver and it's debugging in:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Device Drivers ---&amp;gt; GPIO Support ---&amp;gt; /sys/class/gpio/... (sysfs interface)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but when using `echo` command to export GPIO21, it gives Invalid argument errno:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio_request: gpio-21 (sysfs) status -22&lt;BR /&gt; export_store: status -22&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I used `cat /sys/kernel/debug/gpio` to see which GPIO pins are reserved by other drivers, but it shows nothing. so this pin is free.&lt;/P&gt;&lt;P&gt;I hacked the kernel for the place of error and found that in beginning of `gpio_request` function in gpiolib.c it crashes at last line in bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;int gpio_request(unsigned gpio, const char *label)&lt;BR /&gt; {&lt;BR /&gt; struct gpio_desc *desc;&lt;BR /&gt; struct gpio_chip *chip;&lt;BR /&gt; int status = -EINVAL;&lt;BR /&gt; unsigned long flags;&lt;BR /&gt; &lt;BR /&gt; spin_lock_irqsave(&amp;amp;gpio_lock, flags);&lt;BR /&gt; &lt;BR /&gt; if (!gpio_is_valid(gpio))&lt;BR /&gt; goto done;&lt;BR /&gt; desc = &amp;amp;gpio_desc[gpio];&lt;BR /&gt; chip = desc-&amp;gt;chip;&lt;BR /&gt; if (chip == NULL)&lt;BR /&gt; goto done&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;`gpio_desc[gpio]` is an entry of an array in driver (`static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];`) that must be initialized by `gpiochip_add` function in driver. and this function must be called early as driver says:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;/**&lt;BR /&gt; * gpiochip_add() - register a gpio_chip&lt;BR /&gt; * @chip: the chip to register, with chip-&amp;gt;base initialized&lt;BR /&gt; * Context: potentially before irqs or kmalloc will work&lt;BR /&gt; *&lt;BR /&gt; * Returns a negative errno if the chip can't be registered, such as&lt;BR /&gt; * because the chip-&amp;gt;base is invalid or already associated with a&lt;BR /&gt; * different chip. Otherwise it returns zero as a success code.&lt;BR /&gt; *&lt;BR /&gt; * When gpiochip_add() is called very early during boot, so that GPIOs&lt;BR /&gt; * can be freely used, the chip-&amp;gt;dev device must be registered before&lt;BR /&gt; * the gpio framework's arch_initcall(). Otherwise sysfs initialization&lt;BR /&gt; * for GPIOs will fail rudely.&lt;BR /&gt; *&lt;BR /&gt; * If chip-&amp;gt;base is negative, this requests dynamic assignment of&lt;BR /&gt; * a range of valid GPIOs.&lt;BR /&gt; */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but `gpiochip_add` function never is called during boot.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;Here is the .dts file:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio@c00 {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;device_type = "gpio";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "fsl,mpc8315-gpio";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;reg = &amp;lt;0xc00 0x100&amp;gt;; //reg = &amp;lt;0xc00 0x18&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;interrupt-parent = &amp;lt; &amp;amp;ipic &amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you&amp;nbsp;help me with this problem?&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;I changed dts file to this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio1: gpio-controller@c00 {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#gpio-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "fsl,mpc8308-gpio", "fsl,mpc8349-gpio";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;reg = &amp;lt;0xc00 0x100&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;interrupt-parent = &amp;lt;&amp;amp;ipic&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;interrupts = &amp;lt;74 0x8&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;gpio-controller;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;interrupt-controller;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#interrupt-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;and now it shows `gpiochip224` in `/sys/class/gpio` and this gpiochip has 32 GPIOs. but I don't know what is the mapping between 21 and 224-255?&lt;BR /&gt;can anyone tell me what is the relation between PIN numbers in datasheet and GPIO numbers in kernel for MPC8308 PowerPC series processor?&amp;nbsp;&lt;SPAN style="color: #242729; background-color: #ffffff;"&gt;I try all numbers 224-255 and none of them works.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Sep 2016 07:41:43 GMT</pubDate>
    <dc:creator>alitahamia</dc:creator>
    <dc:date>2016-09-22T07:41:43Z</dc:date>
    <item>
      <title>linux gpio driver can't export GPIO on mpc8308</title>
      <link>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640514#M1900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use linux GPIO driver to handle one of the GPIO pins of mpc8308 processor as output. so I enabled the GPIO driver and it's debugging in:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Device Drivers ---&amp;gt; GPIO Support ---&amp;gt; /sys/class/gpio/... (sysfs interface)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but when using `echo` command to export GPIO21, it gives Invalid argument errno:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio_request: gpio-21 (sysfs) status -22&lt;BR /&gt; export_store: status -22&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I used `cat /sys/kernel/debug/gpio` to see which GPIO pins are reserved by other drivers, but it shows nothing. so this pin is free.&lt;/P&gt;&lt;P&gt;I hacked the kernel for the place of error and found that in beginning of `gpio_request` function in gpiolib.c it crashes at last line in bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;int gpio_request(unsigned gpio, const char *label)&lt;BR /&gt; {&lt;BR /&gt; struct gpio_desc *desc;&lt;BR /&gt; struct gpio_chip *chip;&lt;BR /&gt; int status = -EINVAL;&lt;BR /&gt; unsigned long flags;&lt;BR /&gt; &lt;BR /&gt; spin_lock_irqsave(&amp;amp;gpio_lock, flags);&lt;BR /&gt; &lt;BR /&gt; if (!gpio_is_valid(gpio))&lt;BR /&gt; goto done;&lt;BR /&gt; desc = &amp;amp;gpio_desc[gpio];&lt;BR /&gt; chip = desc-&amp;gt;chip;&lt;BR /&gt; if (chip == NULL)&lt;BR /&gt; goto done&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;`gpio_desc[gpio]` is an entry of an array in driver (`static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];`) that must be initialized by `gpiochip_add` function in driver. and this function must be called early as driver says:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;/**&lt;BR /&gt; * gpiochip_add() - register a gpio_chip&lt;BR /&gt; * @chip: the chip to register, with chip-&amp;gt;base initialized&lt;BR /&gt; * Context: potentially before irqs or kmalloc will work&lt;BR /&gt; *&lt;BR /&gt; * Returns a negative errno if the chip can't be registered, such as&lt;BR /&gt; * because the chip-&amp;gt;base is invalid or already associated with a&lt;BR /&gt; * different chip. Otherwise it returns zero as a success code.&lt;BR /&gt; *&lt;BR /&gt; * When gpiochip_add() is called very early during boot, so that GPIOs&lt;BR /&gt; * can be freely used, the chip-&amp;gt;dev device must be registered before&lt;BR /&gt; * the gpio framework's arch_initcall(). Otherwise sysfs initialization&lt;BR /&gt; * for GPIOs will fail rudely.&lt;BR /&gt; *&lt;BR /&gt; * If chip-&amp;gt;base is negative, this requests dynamic assignment of&lt;BR /&gt; * a range of valid GPIOs.&lt;BR /&gt; */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but `gpiochip_add` function never is called during boot.&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px 1em;"&gt;Here is the .dts file:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio@c00 {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;device_type = "gpio";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "fsl,mpc8315-gpio";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;reg = &amp;lt;0xc00 0x100&amp;gt;; //reg = &amp;lt;0xc00 0x18&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;interrupt-parent = &amp;lt; &amp;amp;ipic &amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you&amp;nbsp;help me with this problem?&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;I changed dts file to this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio1: gpio-controller@c00 {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#gpio-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "fsl,mpc8308-gpio", "fsl,mpc8349-gpio";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;reg = &amp;lt;0xc00 0x100&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;interrupt-parent = &amp;lt;&amp;amp;ipic&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;interrupts = &amp;lt;74 0x8&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;gpio-controller;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;interrupt-controller;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;#interrupt-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;and now it shows `gpiochip224` in `/sys/class/gpio` and this gpiochip has 32 GPIOs. but I don't know what is the mapping between 21 and 224-255?&lt;BR /&gt;can anyone tell me what is the relation between PIN numbers in datasheet and GPIO numbers in kernel for MPC8308 PowerPC series processor?&amp;nbsp;&lt;SPAN style="color: #242729; background-color: #ffffff;"&gt;I try all numbers 224-255 and none of them works.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2016 07:41:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640514#M1900</guid>
      <dc:creator>alitahamia</dc:creator>
      <dc:date>2016-09-22T07:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: linux gpio driver can't export GPIO on mpc8308</title>
      <link>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640515#M1901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;The following setting is needed for sysfs GPIO using:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Check please that the following kernel configuration options are set. These options are necessary &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;for sysfs GPIO support:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CONFIG_MPC8XXX_GPIO (Platform Support / MPC8xxx GPIO support)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CONFIG_OF_GPIO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CONFIG_GPIOLIB (-*- GPIO Support&amp;nbsp; ---&amp;gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CONFIG_GPIO_SYSFS (/sys/class/gpio/... (sysfs interface))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CONFIG_GENERIC_GPIO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;This option can be checked using the .config file in the kernel source folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;GPIO controllers should be declared in the Device Tree file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;More information on the device tree GPIO declaration can be found in the kernel source. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;See please the following files: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;/Documentation/powerpc/dts-bindings/gpio.txt and /Documentation/powerpc/dts-bindings/fsl/8xxx_gpio.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;The MPC8308erd LTIB Linux BSP does not support all of these settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Use mmap possibility for gpio using on the MPC8308erdb board.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 27 Sep 2016 05:33:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640515#M1901</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2016-09-27T05:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: linux gpio driver can't export GPIO on mpc8308</title>
      <link>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640516#M1902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I have checked options you mentioned in kernel config file.&lt;/P&gt;&lt;P&gt;also I use the following dts file that is compatible with documentations in devicetree &amp;nbsp;bindings of ltib,&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;gpio1: gpio-controller@c00 {&lt;BR /&gt; #gpio-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt; compatible = "fsl,mpc8308-gpio", "fsl,mpc8349-gpio";&lt;BR /&gt; reg = &amp;lt;0xc00 0x100&amp;gt;;&lt;BR /&gt; interrupts = &amp;lt;74 0x8&amp;gt;;&lt;BR /&gt; interrupt-parent = &amp;lt;&amp;amp;ipic&amp;gt;;&lt;BR /&gt; gpio-controller;&lt;BR /&gt; // interrupt-controller;&lt;BR /&gt; // #interrupt-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but instead of using mmap I set GPIO and SICRH registers of mpc8308 and read them (for correct write) in kernel (I don't know that this should work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void __iomem *immap;&lt;/P&gt;&lt;P&gt;unsigned long sicrh;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;immap = ioremap(get_immrbase(), 0x1000);&lt;BR /&gt;if (immap) {&lt;BR /&gt; sicrh = in_be32(immap + MPC83XX_SICRH_OFFS);&lt;BR /&gt; printk(KERN_INFO " immap=0x%x SICRH=0x%x \n",immap,sicrh);&lt;BR /&gt; sicrh |= 0x0ff;&lt;BR /&gt; printk(KERN_INFO "&lt;SPAN style="background-color: #f6f6f6;"&gt;SICRH=&lt;/SPAN&gt;0x%x \n",sicrh);&lt;BR /&gt; out_be32(immap + MPC83XX_SICRH_OFFS, sicrh);&lt;BR /&gt; out_be32(immap + 0x0c00, 0x0ffff);//&lt;SPAN style="background-color: #f6f6f6;"&gt;0x0c00 is offset of GPDIR register&lt;/SPAN&gt;&lt;BR /&gt;out_be32(immap + 0x0c08, 0x0ffff);//&lt;SPAN style="background-color: #f6f6f6;"&gt;0x0c08 is offset of GPDAT register&lt;/SPAN&gt;&lt;BR /&gt; udelay(3000000);//after a delay set open drain register to 1 and try again&lt;BR /&gt; out_be32(immap + 0x0c04, 0x0ffff);//&lt;SPAN style="background-color: #f6f6f6;"&gt;0x0c04 is offset of GPODR register&lt;/SPAN&gt;&lt;BR /&gt; out_be32(immap + 0x0c08, 0x0ffff);&lt;BR /&gt; iounmap(immap);&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;however gpio pin still doesn't turn on!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 17:18:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/PowerQUICC-Processors/linux-gpio-driver-can-t-export-GPIO-on-mpc8308/m-p/640516#M1902</guid>
      <dc:creator>alitahamia</dc:creator>
      <dc:date>2016-10-03T17:18:05Z</dc:date>
    </item>
  </channel>
</rss>

