[PATCH 0/2] pinctrl: stm32; Fix build issue in -next and make compile-testing possible

STALE3827d

5 messages, 2 authors, 2016-02-09 · open the first message on its own page

[PATCH 0/2] pinctrl: stm32; Fix build issue in -next and make compile-testing possible

From: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Date: 2016-02-08 17:57:53

This two-patches series fixes two problems on stm32 pinctrl driver:
	1 - As reported by Arnd, there is a missing dependency with DT Bindings
headers on Linus' pinctrl/devel branch. This dependency is in fact not needed,
so the first patch removes it.
	2 - The driver could be selected for compile testing via menuconfig, but
the Makefile only selected stm32 driver directory if ARCH_STM32 was selected.
The second patch selects the stm32 driver if PINCTRL_STM32 is selected.

Regards,
Maxime

Maxime Coquelin (2):
  pinctrl: stm32: Remove dependency with DT bindings header files
  pinctrl: stm32: Fix compile testing selection

 drivers/pinctrl/Makefile              | 2 +-
 drivers/pinctrl/stm32/pinctrl-stm32.c | 2 --
 drivers/pinctrl/stm32/pinctrl-stm32.h | 8 ++++++++
 3 files changed, 9 insertions(+), 3 deletions(-)

-- 
1.9.1

[PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files

From: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Date: 2016-02-08 17:57:56

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>
---
 drivers/pinctrl/stm32/pinctrl-stm32.c | 2 --
 drivers/pinctrl/stm32/pinctrl-stm32.h | 8 ++++++++
 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index 9a08222..8deb566 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -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"
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.h b/drivers/pinctrl/stm32/pinctrl-stm32.h
index 1b7c369..35ebc94 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.h
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.h
@@ -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;
-- 
1.9.1

Re: [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files

From: Linus Walleij <hidden>
Date: 2016-02-09 09:53:12

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
[off-list ref] wrote:
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>
Patch applied.

Yours,
Linus Walleij

[PATCH 2/2] pinctrl: stm32: Fix compile testing selection

From: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Date: 2016-02-08 17:59:32

While selecting the driver for compile testing seemed possible,
the driver was not compiled because the driver directory was only
added if ARCH_STM32 was selected.

This patch now makes the pinctrl Makefile to add stm32 directory if
PINCTRL_STM32 is selected.

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
---
 drivers/pinctrl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 8adc235..7ea62ef 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -46,7 +46,7 @@ obj-$(CONFIG_ARCH_QCOM)		+= qcom/
 obj-$(CONFIG_PINCTRL_SAMSUNG)	+= samsung/
 obj-$(CONFIG_PINCTRL_SH_PFC)	+= sh-pfc/
 obj-$(CONFIG_PINCTRL_SPEAR)	+= spear/
-obj-$(CONFIG_ARCH_STM32)	+= stm32/
+obj-$(CONFIG_PINCTRL_STM32)	+= stm32/
 obj-$(CONFIG_PINCTRL_SUNXI)	+= sunxi/
 obj-$(CONFIG_PINCTRL_UNIPHIER)	+= uniphier/
 obj-$(CONFIG_ARCH_VT8500)	+= vt8500/
-- 
1.9.1

Re: [PATCH 2/2] pinctrl: stm32: Fix compile testing selection

From: Linus Walleij <hidden>
Date: 2016-02-09 09:54:02

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
[off-list ref] wrote:
While selecting the driver for compile testing seemed possible,
the driver was not compiled because the driver directory was only
added if ARCH_STM32 was selected.

This patch now makes the pinctrl Makefile to add stm32 directory if
PINCTRL_STM32 is selected.

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Patch applied.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help