Adding /dev/gpiomem

Would it be possible to port the /dev/gpiomem character kernel driver to Rock Pi S? This looks like it would be fairly straightforward. I just want the ability to map the GPIO memory into user space. I took a look into it but I am fighting with tool chains. I do not want to upgrade off mainline kernel at the moment.

How long before this would make it to a kernel upgrade in apt for Rock Pi S running Ubuntu or something like that?

To map GPIO memory, we usually use /dev/mem, you can try it.

I would like to map GPIO memory without needing root or daemon, if possible.

Maybe you need the function “setuid” to change the permissions of common users.

It probably already exists. Official Armbian 22.08 for Rockpi S