Change use of /dev/mem to /dev/gpiomem
If we use /dev/gpiomem instead of /dev/mem, we have some benefits...:
- /dev/gpiomem can be accessed by users of group "gpio" - so no root access required any more!
- the GPIO_BASE macro is not needed any more ... so theoretically we would not need any difference between raspberry pi 1, 2 and 4 - they could use one single .h file and only one build target is needed for raspberries
- in 64bit kernels there is a kernel config option which prohibits userspace access to /dev/mem ... this is enabled in nearly every recent OS, so one would have to pass kernel options to disable this behaviour .... but because we use gpiomem now, this is not needed!
Compiling for all build configs, but I have only tested the raspberrypi4 one
added another commit which removes the unnecessary build configs and .h files ... there is now only one "raspberrypi" build target
This is not universally supported, not all host boards have a gpiomem driver. So at the very least this change should be optional behind a flag, not changed outright.
Ok you're right ... I will add a flag to the raspberrypi.h file and restore the stuff to the a10 and am335x
done adding a flag for /dev/gpiomem usage