hostapd: add acs feature indication
[openwrt/openwrt.git] / target / linux / sunxi / patches-4.9 / 0031-pinctrl-sunxi-Use-macros-from-bindings-header-file-f.patch
1 From 42676fa4aa87eda4fc762df495d4bde2ddc4bfce Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@free-electrons.com>
3 Date: Tue, 11 Oct 2016 17:46:00 +0200
4 Subject: pinctrl: sunxi: Use macros from bindings header file for DT parsing
5
6 Since we have some bindings header for our hardcoded flags, let's use them
7 when we can.
8
9 Acked-by: Chen-Yu Tsai <wens@csie.org>
10 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 ---
13 drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 ++++--
14 1 file changed, 4 insertions(+), 2 deletions(-)
15
16 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
17 +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
18 @@ -28,6 +28,8 @@
19 #include <linux/platform_device.h>
20 #include <linux/slab.h>
21
22 +#include <dt-bindings/pinctrl/sun4i-a10.h>
23 +
24 #include "../core.h"
25 #include "pinctrl-sunxi.h"
26
27 @@ -163,9 +165,9 @@ static int sunxi_pctrl_parse_bias_prop(s
28 return -EINVAL;
29
30 switch (val) {
31 - case 1:
32 + case SUN4I_PINCTRL_PULL_UP:
33 return PIN_CONFIG_BIAS_PULL_UP;
34 - case 2:
35 + case SUN4I_PINCTRL_PULL_DOWN:
36 return PIN_CONFIG_BIAS_PULL_DOWN;
37 }
38