Discussion:
[fedora-arm] Missing bcm2835-gpiomem kernel module in Fedora 25
m***@sladkovi.eu
2016-11-27 13:55:57 UTC
Permalink
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
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-le
Peter Robinson
2016-11-28 05:11:27 UTC
Permalink
Post by m***@sladkovi.eu
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?
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscrib
Michal Sladek
2016-11-28 06:30:18 UTC
Permalink
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/bcm2835-gpiomem.c

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_Pi_2/pi_2_mmio.c

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
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-l
Marcin Juszkiewicz
2016-11-28 08:41:03 UTC
Permalink
Post by m***@sladkovi.eu
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.

Loading...