From: Maxime Coquelin <mcoquelin.stm32@gmail.com> To: patrice.chotard@st.com, Linus Walleij <linus.walleij@linaro.org>, Mark Rutland <mark.rutland@arm.com>, Rob Herring <robh+dt@kernel.org>, linux-gpio@vger.kernel.org, arnd@arndb.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, afaerber@suse.de, devicetree@vger.kernel.org, Daniel Thompson <daniel.thompson@linaro.org>, bruherrera@gmail.com Subject: [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files Date: Mon, 8 Feb 2016 18:57:38 +0100 [thread overview] Message-ID: <1454954259-4923-2-git-send-email-mcoquelin.stm32@gmail.com> (raw) In-Reply-To: <1454954259-4923-1-git-send-email-mcoquelin.stm32@gmail.com> 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
WARNING: multiple messages have this Message-ID (diff)
From: mcoquelin.stm32@gmail.com (Maxime Coquelin) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files Date: Mon, 8 Feb 2016 18:57:38 +0100 [thread overview] Message-ID: <1454954259-4923-2-git-send-email-mcoquelin.stm32@gmail.com> (raw) In-Reply-To: <1454954259-4923-1-git-send-email-mcoquelin.stm32@gmail.com> 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
next prev parent reply other threads:[~2016-02-08 17:57 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 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 ` Maxime Coquelin [this message] 2016-02-08 17:57 ` [PATCH 1/2] pinctrl: stm32: Remove dependency with DT bindings header files 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1454954259-4923-2-git-send-email-mcoquelin.stm32@gmail.com \ --to=mcoquelin.stm32@gmail.com \ --cc=afaerber@suse.de \ --cc=arnd@arndb.de \ --cc=bruherrera@gmail.com \ --cc=daniel.thompson@linaro.org \ --cc=devicetree@vger.kernel.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=patrice.chotard@st.com \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.