All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: stm32; Fix build issue in -next and make compile-testing possible
@ 2016-02-08 17:57 ` Maxime Coquelin
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: patrice.chotard, Linus Walleij, Mark Rutland, Rob Herring,
	linux-gpio, arnd
  Cc: linux-arm-kernel, linux-kernel, afaerber, devicetree,
	Daniel Thompson, bruherrera

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 0/2] pinctrl: stm32; Fix build issue in -next and make compile-testing possible
@ 2016-02-08 17:57 ` Maxime Coquelin
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files
  2016-02-08 17:57 ` Maxime Coquelin
@ 2016-02-08 17:57   ` Maxime Coquelin
  -1 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: patrice.chotard, Linus Walleij, Mark Rutland, Rob Herring,
	linux-gpio, arnd
  Cc: linux-arm-kernel, linux-kernel, afaerber, devicetree,
	Daniel Thompson, bruherrera

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files
@ 2016-02-08 17:57   ` Maxime Coquelin
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] pinctrl: stm32: Fix compile testing selection
  2016-02-08 17:57 ` Maxime Coquelin
  (?)
@ 2016-02-08 17:57   ` Maxime Coquelin
  -1 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: patrice.chotard, Linus Walleij, Mark Rutland, Rob Herring,
	linux-gpio, arnd
  Cc: devicetree, Daniel Thompson, bruherrera, linux-kernel, afaerber,
	linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] pinctrl: stm32: Fix compile testing selection
@ 2016-02-08 17:57   ` Maxime Coquelin
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: patrice.chotard, Linus Walleij, Mark Rutland, Rob Herring,
	linux-gpio, arnd
  Cc: linux-arm-kernel, linux-kernel, afaerber, devicetree,
	Daniel Thompson, bruherrera

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] pinctrl: stm32: Fix compile testing selection
@ 2016-02-08 17:57   ` Maxime Coquelin
  0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-02-08 17:57 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files
  2016-02-08 17:57   ` Maxime Coquelin
@ 2016-02-09  9:53     ` Linus Walleij
  -1 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-09  9:53 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Patrice CHOTARD, Mark Rutland, Rob Herring, linux-gpio,
	Arnd Bergmann, linux-arm-kernel, linux-kernel,
	Andreas Färber, devicetree, Daniel Thompson, Bruno Herrera

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
<mcoquelin.stm32@gmail.com> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files
@ 2016-02-09  9:53     ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-09  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
<mcoquelin.stm32@gmail.com> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] pinctrl: stm32: Fix compile testing selection
  2016-02-08 17:57   ` Maxime Coquelin
  (?)
@ 2016-02-09  9:53       ` Linus Walleij
  -1 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-09  9:53 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Patrice CHOTARD, Mark Rutland, Rob Herring,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA, Arnd Bergmann,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Andreas Färber,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Daniel Thompson,
	Bruno Herrera

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
<mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/2] pinctrl: stm32: Fix compile testing selection
@ 2016-02-09  9:53       ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-09  9:53 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Patrice CHOTARD, Mark Rutland, Rob Herring, linux-gpio,
	Arnd Bergmann, linux-arm-kernel, linux-kernel,
	Andreas Färber, devicetree, Daniel Thompson, Bruno Herrera

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
<mcoquelin.stm32@gmail.com> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/2] pinctrl: stm32: Fix compile testing selection
@ 2016-02-09  9:53       ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-09  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 8, 2016 at 6:57 PM, Maxime Coquelin
<mcoquelin.stm32@gmail.com> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-02-09  9:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 17:57 [PATCH 0/2] pinctrl: stm32; Fix build issue in -next and make compile-testing possible Maxime Coquelin
2016-02-08 17:57 ` Maxime Coquelin
2016-02-08 17:57 ` [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files Maxime Coquelin
2016-02-08 17:57   ` Maxime Coquelin
2016-02-09  9:53   ` Linus Walleij
2016-02-09  9:53     ` Linus Walleij
2016-02-08 17:57 ` [PATCH 2/2] pinctrl: stm32: Fix compile testing selection Maxime Coquelin
2016-02-08 17:57   ` Maxime Coquelin
2016-02-08 17:57   ` Maxime Coquelin
     [not found]   ` <1454954259-4923-3-git-send-email-mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-09  9:53     ` Linus Walleij
2016-02-09  9:53       ` Linus Walleij
2016-02-09  9:53       ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.