EasyManua.ls Logo

Phytec i.MX 93 - Page 62

Default Icon
85 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i.MX 93 BSP Manual PD24.1.1 Documentation Rev.: imx8mp-pd22.1.2-51-ga548be7d
(continued from previous page)
Set GPIO line values of a GPIO chip
Options:
-h, --help: display this message and exit
-v, --version: display the version and exit
-l, --active-low: set the line active state to low
-m, --mode=[exit|wait|time|signal] (defaults to 'exit'):
tell the program what to do after setting values
-s, --sec=SEC: specify the number of seconds to wait (only valid for --mode=time)
-u, --usec=USEC: specify the number of microseconds to wait (only valid for --
,mode=time)
-b, --background: after setting values: detach from the controlling terminal
Modes:
exit: set values and exit immediately
wait: set values and wait for user to press ENTER
time: set values and sleep for a specified amount of time
signal: set values and wait for SIGINT or SIGTERM
Note: the state of a GPIO line controlled over the character device reverts to default
when the last process referencing the file descriptor representing the device file exits.
This means that it's wrong to run gpioset, have it exit and expect the line to continue
being driven high or low. It may happen if given pin is floating but it must be interpreted
as undefined behavior.
Warning
Some of the user IOs are used for special functions. Before using a user IO, refer to the schematic or the
hardware manual of your board to ensure that it is not already in use.
7.5.1 GPIOs via sysfs
Warning
Accessing gpios via sysfs is deprecated and we encourage to use libgpiod instead.
Support to access GPIOs via sysfs is not enabled by default any more. It is only possible with manually
enabling CONFIG_GPIO_SYSFS in the kernel conguration. To make CONFIG_GPIO_SYSFS visible
in menucong the option CONFIG_EXPERT has to be enabled rst.
You can also add this option for example to the imx9_phytec_distro.cong cong fragment in the linux
kernel sources under arch/arm64/congs
..
CONFIG_GPIO_SYSFS=y
..
Accessing Peripherals 58