pinctrl: samsung: Use define from dt-bindings for pin mux function
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>
This commit is contained in:
parent
ff60dcedbd
commit
4460dc21cb
|
@ -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);
|
||||
|
@ -204,7 +206,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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue