OSDN Git Service

pinctrl: lpc18xx: create pin cap lookup helper
authorJoachim Eastwood <manabian@gmail.com>
Wed, 6 May 2015 17:11:21 +0000 (19:11 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 12 May 2015 11:17:48 +0000 (13:17 +0200)
commit403fbdee4728afc4e5c4b0a24b8eac3b52595b39
treef7c51c9af3adeb6e032b86861e0f6b41239cdb14
parente8e36d2f1873218a2fdaf0b7cd335b84e8be6112
pinctrl: lpc18xx: create pin cap lookup helper

Both pconf_get_pin and pconf_set_pin needs to lookup pin cap based
on the pin number. Create a common helper function that both
functions can use that also handles the case where no pin number is
found in the pins array.

This also fixes a small bug in pconf_get_pin where pconf_get_i2c0
would use the pins array index rather than the pin number.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-lpc18xx.c