]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pinctrl: abx500: Rejiggle platform data and DT initialisation
authorLee Jones <lee.jones@linaro.org>
Wed, 8 May 2013 13:29:08 +0000 (14:29 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 14 May 2013 11:07:49 +0000 (13:07 +0200)
commit86c976e43da417e341bee30ee734b89743ebe7e8
treec6f0992e28b61a08d4936882cd037d32066b48bf
parent2fcad12eb4d80b174c69bfbc34d1c094ad37e1bd
pinctrl: abx500: Rejiggle platform data and DT initialisation

Platform Data is invariably populated for this driver, even when
booting with Device Tree. Thus the Device Tree probing code encased
within the first check for Platform Data will never executed, causing
the driver to fail when DT is enabled.

This patch fixes the aforementioned regression by rejigging the
probe() semantics to attempt to extract a platform ID from Device Tree
if one can not be sourced from platform data.

A pointer to GPIO platform data is always passed to the driver now, so
there's little point in checking for 'pdata' and executing the DT case if
it's not there. The difference between booting with DT and !DT is when
booting with DT, plat_id is not populated. Thus, in the DT case we have
to use a DT match table in order to find out which platform we're
executing on. So, we're changing the semantics here to only use the
match table if no plat_id is supplied though platform data.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
[edited commit message]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-abx500.c