Skip to content

Commit

Permalink
pinctrl: sunxi: Use macros from bindings header file for DT parsing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard authored and Linus Walleij committed Oct 24, 2016
1 parent f233dbc commit 42676fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/pinctrl/sunxi/pinctrl-sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 42676fa

Please sign in to comment.