From: Maxime Ripard Date: Tue, 11 Oct 2016 15:46:00 +0000 (+0200) Subject: pinctrl: sunxi: Use macros from bindings header file for DT parsing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42676fa4aa87eda4fc762df495d4bde2ddc4bfce;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij --- 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 #include +#include + #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; }