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

Tony Lindgren tony at atomide.com
Tue Jun 21 04:28:59 PDT 2016


* Uwe Kleine-König <u.kleine-koenig at pengutronix.de> [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 <tony at atomide.com>



More information about the linux-arm-kernel mailing list