pinctrl: Move pint PM storage structure out of blackfin architecture.
PATCH 1/3 pinctrl: Move pint PM storage structure out of blackfin architecture.
From: Sonic Zhang <[email protected]>
It is better to keep this structure in the pinctrl-adi2 driver.
--- arch/blackfin/include/asm/irq.h | 9 --------- drivers/pinctrl/pinctrl-adi2.c | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 10 deletions(-)
arch/blackfin/include/asm/irq.h +0 -9
@@ -20,15 +20,6 @@/* SYS_IRQS and NR_IRQS are defined in <mach-bf5xx/irq.h> */ #include <mach/irq.h> -/* -* pm save bfin pint registers -*/ -struct adi_pm_pint_save { -u32 assign; -u32 edge_set; -u32 invert_set; -}; -#if ANOMALY_05000244 && defined(CONFIG_BFIN_ICACHE )# define NOP_PAD_ANOMALY_05000244 "nop; nop;"#else
drivers/pinctrl/pinctrl-adi2.c +14 -1
@@ -89,6 +89,19 @@ struct gpio_port_saved {u32 mux; }; +/* +* struct gpio_pint_saved - PINT registers saved in PM operations +* +* @assign: ASSIGN register +* @edge_set: EDGE_SET register +* @invert_set: INVERT_SET register +*/ +struct gpio_pint_saved { +u32 assign; +u32 edge_set; +u32 invert_set; +}; +/** * struct gpio_pint - Pin interrupt controller device. Multiple ADI GPIO * banks can be mapped into one Pin interrupt controller.
@@ -114,7 +127,7 @@ struct gpio_pint {int irq;struct irq_domain *domain[2 ];struct gpio_pint_regs *regs; -struct adi_pm_pint_save saved_data; +struct gpio_pint_saved saved_data;int map_count;spinlock_t lock;
Signature · 1 line
1.8.2.3
PATCH 2/3 pinctrl-adi2: change irq_base from usigned int to int
From: Sonic Zhang <[email protected]>
Negative irq_base means this gpio port doens't support interrupts.
--- drivers/pinctrl/pinctrl-adi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-adi2.c +1 -1
@@ -173,7 +173,7 @@ struct adi_pinctrl {struct gpio_port {struct list_head node;void __iomem *base; -unsigned int irq_base; +int irq_base;unsigned int width;struct gpio_port_t *regs;struct gpio_port_saved saved_data;
Signature · 1 line
1.8.2.3
Re: [PATCH 2/3] pinctrl-adi2: change irq_base from usigned int to int
Quoted 5 lines · Sonic Zhang
From: Sonic Zhang <[email protected]>
Negative
irq_basemeans this gpio port doens't support interrupts.Signed-off-by Sonic Zhang <[email protected]>
Patch applied.
Yours,
Linus Walleij
PATCH 3/3 pinctrl-adi2: fix coding style issue
In reply to Sonic ZhangFrom: Sonic Zhang <[email protected]>
--- drivers/pinctrl/pinctrl-adi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-adi2.c +1 -1
@@ -641,7 +641,7 @@ static int adi_pinmux_enable(struct pinctrl_dev *pctldev, unsigned selector,spin_lock_irqsave (&port->lock, flags);portmux_setup (port,pin_to_offset (range, pin), -P_FUNCT2MUX (*mux)); +P_FUNCT2MUX (*mux));port_setup (port,pin_to_offset (range, pin), false); mux++;
Signature · 1 line
1.8.2.3
Re: [PATCH 3/3] pinctrl-adi2: fix coding style issue
Quoted 3 lines · Sonic Zhang
From: Sonic Zhang <[email protected]>
Signed-off-by Sonic Zhang <[email protected]>
Patch applied.
Yours,
Linus Walleij
Quoted 5 lines · Sonic Zhang
From: Sonic Zhang <[email protected]>
It is better to keep this structure in the pinctrl-adi2 driver.
Signed-off-by Sonic Zhang <[email protected]>
Seems like a good idea, patch applied.
(Steven, complain if any problem.)
Yours,
Linus Walleij