Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494811 > unrolled thread
| Started by | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| First post | 2016-10-03 12:30 +0200 |
| Last post | 2016-10-04 04:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/9] pinctrl: sunxi: Add bindings define Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-03 12:30 +0200
Re: [PATCH 2/9] pinctrl: sunxi: Add bindings define Chen-Yu Tsai <wens@csie.org> - 2016-10-04 04:00 +0200
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2016-10-03 12:30 +0200 |
| Subject | [PATCH 2/9] pinctrl: sunxi: Add bindings define |
| Message-ID | <so8Fs-3GE-19@gated-at.bofh.it> |
Since we have some bindings header for our hardcoded flags, let's use them
when we can.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index 64f7f6dcc027..5be455d5e252 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 "../../gpio/gpiolib.h"
#include "pinctrl-sunxi.h"
@@ -164,9 +166,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;
}
--
git-series 0.8.10
[toc] | [next] | [standalone]
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Date | 2016-10-04 04:00 +0200 |
| Message-ID | <sonbr-4an-7@gated-at.bofh.it> |
| In reply to | #1494811 |
On Mon, Oct 3, 2016 at 6:21 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Since we have some bindings header for our hardcoded flags, let's use them
> when we can.
"Use macros from bindings header file for DT parsing"
would make the subject clearer.
Otherwise,
Acked-by: Chen-Yu Tsai <wens@csie.org>
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
> drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
> index 64f7f6dcc027..5be455d5e252 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 "../../gpio/gpiolib.h"
> #include "pinctrl-sunxi.h"
> @@ -164,9 +166,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;
> }
>
> --
> git-series 0.8.10
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web