Thread (11 messages) flat view 11 messages, 4 authors, 2015-07-16

Re: [PATCH 1/2] gpio: dwapb: Use human understandable gpio numbering.

From: Richard Cochran <richardcochran@gmail.com>
Date: 2015-07-02 14:26:01
Also in: linux-arm-kernel, linux-gpio

On Thu, Jul 02, 2015 at 09:36:22AM +0200, Sebastian Andrzej Siewior wrote:
If you are in a specific SoC you could do
	base = of_alias_get_id(np, "gpio") * num_of_gpio_per_chip
and get consistent numbers / sane.
And what about /sys/class/gpio ?
I think this is the one reason why there is no generic binding for the
starting address. The other reason might be that this is simply a user
space problem. To get consistent numbers all you need to do to lookup
each gpio's memory address and decide if this is the one you look for.
The user should be able to simply look up a GPIO in the data sheet,
and then use it from a shell script.  Why not make that easy to do?

(Other gpio controllers are doing that, too, BTW.)

Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help