AnsweredAssumed Answered

Cannot export specific gpio pins. How to check what uses GPIO pins?

Question asked by Hirotoshi Sato on Sep 7, 2017
Latest reply on Sep 21, 2017 by Biyong Sun


I use an i.mx6 board and am configuring a device tree.

I changed a dts file and put the dtb file in a boot partition.

I set GPIO4_IO19 in dts file as follows.

&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
pinctrl_hog_1: hoggrp-1 {
fsl,pins = <


At first MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 was defined in other group (usdhcgrp) but I commented out them.


After booting, I checked if gpio is successfully determined as I set.

The result is 

echo 115 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy

So I checked this.

cat /sys/kernel/debug/gpio

GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-10 (phy-reset ) out lo

GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:

GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
gpio-68 (ft5x06_irq_gpio ) in hi

GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-109 (? ) out lo
gpio-115 (cd ) in lo
gpio-116 (? ) out lo
gpio-117 (? ) out lo
gpio-118 (sysfs ) in hi

GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-128 (phy-reset ) out lo

gpio-115 is used by cd. What is cd ?

I want to use it as sysfs to read the state. Any other way to read it ? 

Furthermore, gpio-10, 68, 109, 116, 117 is used by other device.

How can I use them by sysfs?


Thank you for your cooperation.