pinctrl: pinconf-generic: scan also referenced phandle node
authorBaruch Siach <baruch@tkos.co.il>
Thu, 19 Mar 2015 20:17:41 +0000 (22:17 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 27 Mar 2015 08:51:22 +0000 (09:51 +0100)
commitc7289500e29df3441a7167861424e7d77a167dfb
tree25c4c1ee3df0261f92281040cbdedf6326803cb3
parent12149a20b86330d6eac71edaad0357541abdcd05
pinctrl: pinconf-generic: scan also referenced phandle node

Make pinconf_generic_dt_node_to_map() also scan the dt pin configuration node
directly referenced by phandle, not only its child nodes.

The "parent scan" feature needs a few other changes:

   * Move the pinconf_generic_dt_node_to_map() error handling code to a common
     place, under the 'exit' label.

   * Move the pins/groups strings count earlier in
     pinconf_generic_dt_subnode_to_map(), to allow us to bail out early when
     these properties are missing or wrong

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinconf-generic.c