diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-10-11 17:46:00 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-10-24 16:30:14 +0200 |
commit | 42676fa4aa87eda4fc762df495d4bde2ddc4bfce (patch) | |
tree | 824e1fd9039d887a1d9eddb9f9b7277e5d25cf7b | |
parent | f233dbca6227703eaae2f67d6d9c79819773f16b (diff) |
pinctrl: sunxi: Use macros from bindings header file for DT parsing
Since we have some bindings header for our hardcoded flags, let's use them
when we can.
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index cf7eb799c6de..62a9d012b35f 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -28,6 +28,8 @@ #include <linux/platform_device.h> #include <linux/slab.h> +#include <dt-bindings/pinctrl/sun4i-a10.h> + #include "../core.h" #include "pinctrl-sunxi.h" @@ -163,9 +165,9 @@ static int sunxi_pctrl_parse_bias_prop(struct device_node *node) return -EINVAL; switch (val) { - case 1: + case SUN4I_PINCTRL_PULL_UP: return PIN_CONFIG_BIAS_PULL_UP; - case 2: + case SUN4I_PINCTRL_PULL_DOWN: return PIN_CONFIG_BIAS_PULL_DOWN; } |