File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 33
44pinctrl is a more powerful replacement for raspi-gpio, a tool for displaying
55and modifying the GPIO and pin muxing state of a system. It accesses the
6- hardware directly, bypassing the kernel drivers, and as such requires root
7- privilege (run with "sudo").
6+ hardware directly, bypassing the kernel drivers, and as such requires the
7+ necessary privilege. By default, root access is required (i.e. run with
8+ "sudo"), but with a suitable udev rule to change the ownership of
9+ /dev/gpiomem* (as found in RPiOS) this can be relaxed to group membership,
10+ e.g. group "gpio".
811
912The improvements over raspi-gpio include:
1013
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ static void usage(void)
6969 printf ("Running %s with the help argument prints this help.\n" , name );
7070 printf ("%s can get and print the state of a GPIO (or all GPIOs)\n" , name );
7171 printf ("and can be used to set the function, pulls and value of a GPIO.\n" );
72- printf ("%s must be run as root.\n" , name );
72+ printf ("%s must be run as root (or as a member of group 'gpio'\n" , name );
73+ printf ("on RPiOS).\n" );
7374 printf ("Use:\n" );
7475 printf (" %s [-p] [-v] get [GPIO]\n" , name );
7576 printf ("OR\n" );
@@ -674,7 +675,7 @@ int main(int argc, char *argv[])
674675 if (ret )
675676 {
676677 if (ret == EACCES && geteuid ())
677- printf ("Must be root\n" );
678+ printf ("Must be root (or group 'gpio' on RPiOS) \n" );
678679 else
679680 printf ("Failed to mmap gpiolib - %s\n" , strerror (ret ));
680681 return -1 ;
You can’t perform that action at this time.
0 commit comments