Thread (1 message) 1 message, 1 author, 2015-07-02

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

From: Richard Cochran <hidden>
Date: 2015-07-02 15:21:47
Also in: linux-arm-kernel, linux-gpio

On Thu, Jul 02, 2015 at 04:30:47PM +0200, Sebastian Andrzej Siewior wrote:
On 07/02/2015 04:26 PM, Richard Cochran wrote:
quoted
On Thu, Jul 02, 2015 at 09:36:22AM +0200, Sebastian Andrzej Siewior wrote:
quoted
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 ?
What about it?
The poor users of that interface cannot use "of_alias_get_id" as you suggest.
quoted
(Other gpio controllers are doing that, too, BTW.)
I'm not saying that you should not do so. There is _no_ generic binding
for this and this is what I suggest.
I can surely change "snps,base" to something like "gpio-base" as a
generic binding.  Would that be better?

I expected to find the base number as a standard property, but I'm no
DT expert, and I have learned not to question it.

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help