Re: Userspace configurable GPIO pinout

2019-01-28 Thread valdis . kletnieks
On Mon, 28 Jan 2019 13:26:55 +, 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".

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Userspace configurable GPIO pinout

2019-01-28 Thread Laurence Rochfort
Hi all,

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.

I'd appreciate advice on the best/canonical way to allow userspace to
configure the pinout. I read the devicetree docs, but my interpretation was
that was more for a somewhat static configuration to be provided by device
vendors.

Many thanks,
Laurence
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies