kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Userspace configurable GPIO pinout
@ 2019-01-28 13:26 Laurence Rochfort
  2019-01-28 21:05 ` valdis.kletnieks
  0 siblings, 1 reply; 2+ messages in thread
From: Laurence Rochfort @ 2019-01-28 13:26 UTC (permalink / raw)
  To: kernelnewbies; +Cc: Laurence Rochfort


[-- Attachment #1.1: Type: text/plain, Size: 569 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 769 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Userspace configurable GPIO pinout
  2019-01-28 13:26 Userspace configurable GPIO pinout Laurence Rochfort
@ 2019-01-28 21:05 ` valdis.kletnieks
  0 siblings, 0 replies; 2+ messages in thread
From: valdis.kletnieks @ 2019-01-28 21:05 UTC (permalink / raw)
  To: Laurence Rochfort; +Cc: kernelnewbies

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".

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-28 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-28 13:26 Userspace configurable GPIO pinout Laurence Rochfort
2019-01-28 21:05 ` valdis.kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).