Skip to content
Commit fdf9cab5 authored by Jonathan Bell's avatar Jonathan Bell Committed by Phil Elwell
Browse files

drivers: char: add generic gpiomem driver



Based on bcm2835-gpiomem.

We allow export of the "GPIO registers" to userspace via a chardev as
this allows for finer access control (e.g. users must be group gpio, root
not required).

This driver allows access to either rp1-gpiomem or gpiomem, depending on
which nodes are populated in devicetree.

RP1 has a different look-and-feel to BCM283x SoCs as it has split ranges
for IO controls and the parallel registered OE/IN/OUT access. To handle
this, the driver concatenates the ranges for an IO bank and the
corresponding RIO instance into a contiguous buffer.

Signed-off-by: default avatarJonathan Bell <jonathan@raspberrypi.com>
parent 5970fa51
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment