From: Maxime Coquelin Date: Mon, 8 Feb 2016 17:57:38 +0000 (+0100) Subject: pinctrl: stm32: Remove dependency with DT bindings header files X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=38a3fbf16a47868231894cdabef862d2f4e7b40a;p=linux-beck.git pinctrl: stm32: Remove dependency with DT bindings header files 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 Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index 9a08222ecb72..8deb566ed4cd 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -23,8 +23,6 @@ #include #include -#include - #include "../core.h" #include "../pinconf.h" #include "../pinctrl-utils.h" diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.h b/drivers/pinctrl/stm32/pinctrl-stm32.h index 1b7c369acd8c..35ebc94c01e4 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.h +++ b/drivers/pinctrl/stm32/pinctrl-stm32.h @@ -9,6 +9,14 @@ #include #include +#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;