Userspace configurable GPIO pinout

valdis.kletnieks at valdis.kletnieks at
Mon Jan 28 16:05:36 EST 2019

On Mon, 28 Jan 2019 13:26:55 +0000, Laurence Rochfort said:
> I'm writing a driver for an ePaper display, that will attach via GPIO.
> I've read the docs in Documentation/GPIO, and
> Documentation/devicetree/bindings/gpio.
> The ePaper itself just has a 34pin flat-flex cable, so people will have to
> use an adapter board to convert to the GPIO headers for a given system.

At that point, you're really stuck with "userspace gets to connect to 34 GPIO
pins and start bit-bashing".  I don't think there's any sane way for a single driver
to claim 34 GPIO pins, especially when *which* 34 pins get claimed will depend
on what their system is and how the adapter board is wired.

Having said that, the problem then becomes telling userspace how the 34
pins are wired.  About the only way to sort that out is if you're working for
the company that is building this, and you provide adapters for systems, and
a userspace installer program that says "Oh, this is a beaglebone/RPi/whatever,
so write a /etc/Epaper.conf file to match".

More information about the Kernelnewbies mailing list