* [PATCH 1/2] pinctrl: samsung: dt-bindings: Use better name for external interrupt function @ 2017-06-15 15:06 ` Krzysztof Kozlowski 0 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2017-06-15 15:06 UTC (permalink / raw) To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Linus Walleij, Kukjin Kim, linux-arm-kernel, linux-samsung-soc, linux-gpio, linux-kernel, devicetree On Exynos, 0xf is always used as value of external interrupt in pin mux function thus a more descriptive macro name can be used. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- include/dt-bindings/pinctrl/samsung.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/dt-bindings/pinctrl/samsung.h b/include/dt-bindings/pinctrl/samsung.h index b7aa3646208b..ceb672305f59 100644 --- a/include/dt-bindings/pinctrl/samsung.h +++ b/include/dt-bindings/pinctrl/samsung.h @@ -66,7 +66,8 @@ #define EXYNOS_PIN_FUNC_4 4 #define EXYNOS_PIN_FUNC_5 5 #define EXYNOS_PIN_FUNC_6 6 -#define EXYNOS_PIN_FUNC_F 0xf +#define EXYNOS_PIN_FUNC_EINT 0xf +#define EXYNOS_PIN_FUNC_F EXYNOS_PIN_FUNC_EINT /* Drive strengths for Exynos7 FSYS1 block */ #define EXYNOS7_FSYS1_PIN_DRV_LV1 0 -- 2.9.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/2] pinctrl: samsung: dt-bindings: Use better name for external interrupt function @ 2017-06-15 15:06 ` Krzysztof Kozlowski 0 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2017-06-15 15:06 UTC (permalink / raw) To: linux-arm-kernel On Exynos, 0xf is always used as value of external interrupt in pin mux function thus a more descriptive macro name can be used. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- include/dt-bindings/pinctrl/samsung.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/dt-bindings/pinctrl/samsung.h b/include/dt-bindings/pinctrl/samsung.h index b7aa3646208b..ceb672305f59 100644 --- a/include/dt-bindings/pinctrl/samsung.h +++ b/include/dt-bindings/pinctrl/samsung.h @@ -66,7 +66,8 @@ #define EXYNOS_PIN_FUNC_4 4 #define EXYNOS_PIN_FUNC_5 5 #define EXYNOS_PIN_FUNC_6 6 -#define EXYNOS_PIN_FUNC_F 0xf +#define EXYNOS_PIN_FUNC_EINT 0xf +#define EXYNOS_PIN_FUNC_F EXYNOS_PIN_FUNC_EINT /* Drive strengths for Exynos7 FSYS1 block */ #define EXYNOS7_FSYS1_PIN_DRV_LV1 0 -- 2.9.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] pinctrl: samsung: Use define from dt-bindings for pin mux function 2017-06-15 15:06 ` Krzysztof Kozlowski @ 2017-06-15 15:06 ` Krzysztof Kozlowski -1 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2017-06-15 15:06 UTC (permalink / raw) To: Tomasz Figa, Krzysztof Kozlowski, Sylwester Nawrocki, Linus Walleij, Kukjin Kim, linux-arm-kernel, linux-samsung-soc, linux-gpio, linux-kernel, devicetree We already have macros for values used by driver and Device Tree sources for Pin mux configuration. Use them instead of duplicating defines. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- drivers/pinctrl/samsung/pinctrl-exynos.c | 6 ++++-- drivers/pinctrl/samsung/pinctrl-exynos.h | 1 - drivers/pinctrl/samsung/pinctrl-samsung.c | 4 +++- drivers/pinctrl/samsung/pinctrl-samsung.h | 4 ---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index d95a746f45d7..bdc4e0310060 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -31,6 +31,8 @@ #include <linux/err.h> #include <linux/soc/samsung/exynos-pmu.h> +#include <dt-bindings/pinctrl/samsung.h> + #include "pinctrl-samsung.h" #include "pinctrl-exynos.h" @@ -176,7 +178,7 @@ static int exynos_irq_request_resources(struct irq_data *irqd) con = readl(bank->pctl_base + reg_con); con &= ~(mask << shift); - con |= EXYNOS_EINT_FUNC << shift; + con |= EXYNOS_PIN_FUNC_EINT << shift; writel(con, bank->pctl_base + reg_con); spin_unlock_irqrestore(&bank->slock, flags); @@ -208,7 +210,7 @@ static void exynos_irq_release_resources(struct irq_data *irqd) con = readl(bank->pctl_base + reg_con); con &= ~(mask << shift); - con |= FUNC_INPUT << shift; + con |= EXYNOS_PIN_FUNC_INPUT << shift; writel(con, bank->pctl_base + reg_con); spin_unlock_irqrestore(&bank->slock, flags); diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h index b90139715c8f..7639b926c5c1 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.h +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h @@ -32,7 +32,6 @@ #define EXYNOS7_WKUP_EMASK_OFFSET 0x900 #define EXYNOS7_WKUP_EPEND_OFFSET 0xA00 #define EXYNOS_SVC_OFFSET 0xB08 -#define EXYNOS_EINT_FUNC 0xF /* helpers to access interrupt service register */ #define EXYNOS_SVC_GROUP_SHIFT 3 diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index a25c3ffae25c..86c98c1dec3a 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -30,6 +30,8 @@ #include <linux/of_device.h> #include <linux/spinlock.h> +#include <dt-bindings/pinctrl/samsung.h> + #include "../core.h" #include "pinctrl-samsung.h" @@ -586,7 +588,7 @@ static int samsung_gpio_set_direction(struct gpio_chip *gc, data = readl(reg); data &= ~(mask << shift); if (!input) - data |= FUNC_OUTPUT << shift; + data |= EXYNOS_PIN_FUNC_OUTPUT << shift; writel(data, reg); return 0; diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/samsung/pinctrl-samsung.h index 61c4cab0ad24..15b26c786b1e 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.h +++ b/drivers/pinctrl/samsung/pinctrl-samsung.h @@ -25,10 +25,6 @@ #include <linux/gpio.h> -/* pinmux function number for pin as gpio output line */ -#define FUNC_INPUT 0x0 -#define FUNC_OUTPUT 0x1 - /** * enum pincfg_type - possible pin configuration types supported. * @PINCFG_TYPE_FUNC: Function configuration. -- 2.9.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] pinctrl: samsung: Use define from dt-bindings for pin mux function @ 2017-06-15 15:06 ` Krzysztof Kozlowski 0 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2017-06-15 15:06 UTC (permalink / raw) To: linux-arm-kernel We already have macros for values used by driver and Device Tree sources for Pin mux configuration. Use them instead of duplicating defines. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> --- drivers/pinctrl/samsung/pinctrl-exynos.c | 6 ++++-- drivers/pinctrl/samsung/pinctrl-exynos.h | 1 - drivers/pinctrl/samsung/pinctrl-samsung.c | 4 +++- drivers/pinctrl/samsung/pinctrl-samsung.h | 4 ---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index d95a746f45d7..bdc4e0310060 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -31,6 +31,8 @@ #include <linux/err.h> #include <linux/soc/samsung/exynos-pmu.h> +#include <dt-bindings/pinctrl/samsung.h> + #include "pinctrl-samsung.h" #include "pinctrl-exynos.h" @@ -176,7 +178,7 @@ static int exynos_irq_request_resources(struct irq_data *irqd) con = readl(bank->pctl_base + reg_con); con &= ~(mask << shift); - con |= EXYNOS_EINT_FUNC << shift; + con |= EXYNOS_PIN_FUNC_EINT << shift; writel(con, bank->pctl_base + reg_con); spin_unlock_irqrestore(&bank->slock, flags); @@ -208,7 +210,7 @@ static void exynos_irq_release_resources(struct irq_data *irqd) con = readl(bank->pctl_base + reg_con); con &= ~(mask << shift); - con |= FUNC_INPUT << shift; + con |= EXYNOS_PIN_FUNC_INPUT << shift; writel(con, bank->pctl_base + reg_con); spin_unlock_irqrestore(&bank->slock, flags); diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.h b/drivers/pinctrl/samsung/pinctrl-exynos.h index b90139715c8f..7639b926c5c1 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.h +++ b/drivers/pinctrl/samsung/pinctrl-exynos.h @@ -32,7 +32,6 @@ #define EXYNOS7_WKUP_EMASK_OFFSET 0x900 #define EXYNOS7_WKUP_EPEND_OFFSET 0xA00 #define EXYNOS_SVC_OFFSET 0xB08 -#define EXYNOS_EINT_FUNC 0xF /* helpers to access interrupt service register */ #define EXYNOS_SVC_GROUP_SHIFT 3 diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index a25c3ffae25c..86c98c1dec3a 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -30,6 +30,8 @@ #include <linux/of_device.h> #include <linux/spinlock.h> +#include <dt-bindings/pinctrl/samsung.h> + #include "../core.h" #include "pinctrl-samsung.h" @@ -586,7 +588,7 @@ static int samsung_gpio_set_direction(struct gpio_chip *gc, data = readl(reg); data &= ~(mask << shift); if (!input) - data |= FUNC_OUTPUT << shift; + data |= EXYNOS_PIN_FUNC_OUTPUT << shift; writel(data, reg); return 0; diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.h b/drivers/pinctrl/samsung/pinctrl-samsung.h index 61c4cab0ad24..15b26c786b1e 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.h +++ b/drivers/pinctrl/samsung/pinctrl-samsung.h @@ -25,10 +25,6 @@ #include <linux/gpio.h> -/* pinmux function number for pin as gpio output line */ -#define FUNC_INPUT 0x0 -#define FUNC_OUTPUT 0x1 - /** * enum pincfg_type - possible pin configuration types supported. * @PINCFG_TYPE_FUNC: Function configuration. -- 2.9.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-15 15:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-06-15 15:06 [PATCH 1/2] pinctrl: samsung: dt-bindings: Use better name for external interrupt function Krzysztof Kozlowski 2017-06-15 15:06 ` Krzysztof Kozlowski 2017-06-15 15:06 ` [PATCH 2/2] pinctrl: samsung: Use define from dt-bindings for pin mux function Krzysztof Kozlowski 2017-06-15 15:06 ` Krzysztof Kozlowski
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.