]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pinctrl: stm32: Remove dependency with DT bindings header files
authorMaxime Coquelin <mcoquelin.stm32@gmail.com>
Mon, 8 Feb 2016 17:57:38 +0000 (18:57 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 9 Feb 2016 09:52:28 +0000 (10:52 +0100)
Some macros where defined in DT bindings headers, whereas only used
in the driver.

This patch moves these macros to the driver side.

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c
drivers/pinctrl/stm32/pinctrl-stm32.h

index 9a08222ecb7226745c56b03622205bcdaa0c0998..8deb566ed4cd63477c40c8cf56ccdf40308b7b5e 100644 (file)
@@ -23,8 +23,6 @@
 #include <linux/reset.h>
 #include <linux/slab.h>
 
-#include <dt-bindings/pinctrl/pinctrl-stm32.h>
-
 #include "../core.h"
 #include "../pinconf.h"
 #include "../pinctrl-utils.h"
index 1b7c369acd8c0267d06495a3aaa5745eba3fd65a..35ebc94c01e4e7e9bd4fd463ed3c168979acbafc 100644 (file)
@@ -9,6 +9,14 @@
 #include <linux/pinctrl/pinctrl.h>
 #include <linux/pinctrl/pinconf-generic.h>
 
+#define STM32_PIN_NO(x) ((x) << 8)
+#define STM32_GET_PIN_NO(x) ((x) >> 8)
+#define STM32_GET_PIN_FUNC(x) ((x) & 0xff)
+
+#define STM32_PIN_GPIO         0
+#define STM32_PIN_AF(x)                ((x) + 1)
+#define STM32_PIN_ANALOG       (STM32_PIN_AF(15) + 1)
+
 struct stm32_desc_function {
        const char *name;
        const unsigned char num;