pinctrl: atlas7: clear ugly branch statements for pull and drivestrength
authorWei Chen <Wei.Chen@csr.com>
Wed, 5 Aug 2015 03:22:14 +0000 (03:22 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 13 Aug 2015 12:37:21 +0000 (14:37 +0200)
commit627b1516a390e19fb26b1c0c9bd2546722524965
treefe510df1500b4a0edd7fff542c1ec37f58378128
parent39ce8150a079e3ae6ed9abf26d7918a558ef7c19
pinctrl: atlas7: clear ugly branch statements for pull and drivestrength

To set/get atlas7 pull & drive strength, we use lots of if/else
to check pad type. But except mask value or immediate value, all
actions in these conditional branches are the same.
So we use predefined pull info table and drive strength table
to reduce these redundancy code.

Signed-off-by: Wei Chen <Wei.Chen@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sirf/pinctrl-atlas7.c