We're no longer updating This wiki!!

This is an old revision of the document!


Rootless GPIO access: /dev/gpiomem

/dev/gpiomem provides user with root-free access to the GPIO registers. Opening /dev/gpiomem device file and calling mmap() function will map the GPIO registers' memory map area to the user's pointer.
This driver is added in below's Ubuntu kernel versions:

  • ODROID-C2: 3.14.79-105 kernel version or later
  • ODROID-C0/C1+: 3.10.104-182 kernel version or later
  • ODROID-XU4: 4.9.x kernel version or later

How to enable gpiomem driver

/dev/gpiomem driver is included as module by default. In order to use gpiomem driver, it is necessary to configure account access permission.

$ sudo addgroup gpio
$ sudo usermod -a -G gpio odroid    
$ cat /etc/udev/rules.d/90-gpiomem.rules 
  • ODROID-C0/C1+/C2
SUBSYSTEM=="meson-gpiomem", GROUP="gpio", MODE="0660"
  • ODROID-XU4
SUBSYSTEM=="exynos-gpiomem", GROUP="gpio", MODE="0660"
gpiomem.1486087451.txt.gz · Last modified: 2017/02/03 10:34 by brian.kim
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0