Hello!
I use Fedora 25 on my Raspberry Pi 3. I would like to use DHT22 driver from Adafruit but there is no /dev/gpiomem device in Fedora 25. It seems that bcm2835-gpiomem kernel module is missing.
Many drivers and libraries use this device for GPIO access. Is there a package with bcm2835-gpiomem kernel mdule?
Michal
On Sun, Nov 27, 2016 at 1:55 PM, michal@sladkovi.eu wrote:
Hello!
I use Fedora 25 on my Raspberry Pi 3. I would like to use DHT22 driver from Adafruit but there is no /dev/gpiomem device in Fedora 25. It seems that bcm2835-gpiomem kernel module is missing.
Many drivers and libraries use this device for GPIO access. Is there a package with bcm2835-gpiomem kernel mdule?
I don't think that driver is upstream and I think the upstream gpio driver is different. Can you provide more details of the module?
I have just basic user knowledge of Raspberry but if I understand it correctly, the driver should allow non-root access to GPIO pins:
https://github.com/raspberrypi/linux/blob/rpi-4.4.y/drivers/char/broadcom/bc...
I use Rpi3 with Fedora 25 for running Home Assistant and I would like to meassure temperature and humidity directly on Rpi3. I have discovered the gpiomem module while looking into the source code of DHT22 driver from Adafruit:
https://github.com/adafruit/Adafruit_Python_DHT/blob/master/source/Raspberry...
int fd = open("/dev/gpiomem", O_RDWR | O_SYNC);
Then I googled little bit more and realized, that the gpiomem driver is used quite often: https://www.npmjs.com/package/rpio http://wiringpi.com/wiringpi-update-to-2-29/
Michal
On 27 November 2016 at 14:55, michal@sladkovi.eu wrote:
Hello!
I use Fedora 25 on my Raspberry Pi 3. I would like to use DHT22 driver from Adafruit but there is no /dev/gpiomem device in Fedora 25. It seems that bcm2835-gpiomem kernel module is missing.
Many drivers and libraries use this device for GPIO access. Is there a package with bcm2835-gpiomem kernel mdule?
This is 3rdparty driver not present in mainline Linux kernel source. Fedora is shipping mainline kernel.
Consider asking raspberry foundation developers to get it upstreamed.
In meantime use GPIO like it is done on several other mainline supported devices.