提交 42676fa4 编写于 作者: M Maxime Ripard 提交者: Linus Walleij

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: NChen-Yu Tsai <wens@csie.org>
Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 f233dbca
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
#include "../core.h" #include "../core.h"
#include "pinctrl-sunxi.h" #include "pinctrl-sunxi.h"
...@@ -163,9 +165,9 @@ static int sunxi_pctrl_parse_bias_prop(struct device_node *node) ...@@ -163,9 +165,9 @@ static int sunxi_pctrl_parse_bias_prop(struct device_node *node)
return -EINVAL; return -EINVAL;
switch (val) { switch (val) {
case 1: case SUN4I_PINCTRL_PULL_UP:
return PIN_CONFIG_BIAS_PULL_UP; return PIN_CONFIG_BIAS_PULL_UP;
case 2: case SUN4I_PINCTRL_PULL_DOWN:
return PIN_CONFIG_BIAS_PULL_DOWN; return PIN_CONFIG_BIAS_PULL_DOWN;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册