Subject: [PATCH 1/2 v2] gpio: omap: make gpio numbering deterministical by using of aliases

From: [email-masked] (Tony Lindgren)
Date: Tue, 21 Jun 2016 04:28:59 -0700

* Uwe Kleine-K?nig <[email-masked]> [160614 12:03]:
> Traditionally the n-th gpio device probed by the omap gpio driver got
> the gpio number range [n*32 .. n*32+31].
> When order of the devices probed by the driver changes (which can happen
> already now when some devices have a pinctrl and so the first probe
> attempt returns -ENODEV) the numbering changes.
> 
> To ensure a deterministical numbering use of_alias_get_id to determine
> the base for a given device. If no respective alias exists fall back to
> the traditional numbering.
> 
> For the unusual case where only a part of the gpio devices have a
> matching alias some of them might fail to probe. But if none of them has
> an alias or all, there is no conflict which should be good enough to
> maintain backward compatibility.

I think doing this is a good idea to prevent nasty suprises when
upgrading a kernel on some device:

Acked-by: Tony Lindgren <[email-masked]>