]> git.ipfire.org Git - people/arne_f/kernel.git/commit
gpio: pxa: change initcall level second attempt
authorRobert Jarzmik <robert.jarzmik@free.fr>
Fri, 13 Nov 2015 20:22:38 +0000 (21:22 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Nov 2015 08:24:38 +0000 (09:24 +0100)
commiteae122b829483f677dc7784f82437c5d0274e019
tree6c9a6863d93dcd06db0a6783d4dfe23b5760e658
parentfe6435282b4c6f036427cdee83a2a83356d636c0
gpio: pxa: change initcall level second attempt

This patch is a second attempt at what was previously in commit
6c7e660a27da ("gpio: pxa: set initcall level to module init").

The goal is the same : enable gpio & pinctrl driver to work
together. As pinctrl driver will be initialized at device level, the
gpio should be as well, so that the deferring mechanism is honored.

Yet this patch should also respect the legacy platforms, so the set of
constraints is :
 - in legacy platforms (ie. non dt), gpio_[gs]et_*() should be available
   for machine code => core initcall
 - in new platforms (ie. dt based), pinctrl will be available and no
   machine code => device initcall

In order to fullfill all these constraints, the initcall level is either
postcore for non devicetree platforms, and device for devicetree platforms.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pxa.c