Kernel Newbies archive on lore.kernel.org
 help / 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 --]

<div dir="ltr"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I&#39;m writing a driver for an ePaper display, that will attach via GPIO.</div><div><br></div><div>I&#39;ve read the docs in Documentation/GPIO, and Documentation/devicetree/bindings/gpio.</div><div><br></div><div>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.</div><div><br></div><div>I&#39;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.</div><div><br></div><div>Many thanks,</div><div>Laurence<br></div></div></div>

[-- 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, back to index

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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox