Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
bcae8880
Commit
bcae8880
authored
Jul 17, 2015
by
Linus Walleij
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'queue/irq/gpio' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
into devel
parents
3685bbce
bdac2b6d
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
55 additions
and
65 deletions
+55
-65
drivers/gpio/gpio-bcm-kona.c
drivers/gpio/gpio-bcm-kona.c
+1
-1
drivers/gpio/gpio-davinci.c
drivers/gpio/gpio-davinci.c
+9
-10
drivers/gpio/gpio-dwapb.c
drivers/gpio/gpio-dwapb.c
+1
-1
drivers/gpio/gpio-ep93xx.c
drivers/gpio/gpio-ep93xx.c
+4
-2
drivers/gpio/gpio-mpc8xxx.c
drivers/gpio/gpio-mpc8xxx.c
+3
-4
drivers/gpio/gpio-msm-v2.c
drivers/gpio/gpio-msm-v2.c
+7
-15
drivers/gpio/gpio-mvebu.c
drivers/gpio/gpio-mvebu.c
+4
-4
drivers/gpio/gpio-mxc.c
drivers/gpio/gpio-mxc.c
+3
-3
drivers/gpio/gpio-mxs.c
drivers/gpio/gpio-mxs.c
+1
-1
drivers/gpio/gpio-omap.c
drivers/gpio/gpio-omap.c
+3
-3
drivers/gpio/gpio-pch.c
drivers/gpio/gpio-pch.c
+2
-2
drivers/gpio/gpio-sa1100.c
drivers/gpio/gpio-sa1100.c
+2
-2
drivers/gpio/gpio-tegra.c
drivers/gpio/gpio-tegra.c
+3
-5
drivers/gpio/gpio-timberdale.c
drivers/gpio/gpio-timberdale.c
+4
-4
drivers/gpio/gpio-tz1090.c
drivers/gpio/gpio-tz1090.c
+2
-2
drivers/gpio/gpio-vf610.c
drivers/gpio/gpio-vf610.c
+1
-1
drivers/gpio/gpio-zynq.c
drivers/gpio/gpio-zynq.c
+3
-3
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.c
+2
-2
No files found.
drivers/gpio/gpio-bcm-kona.c
View file @
bcae8880
...
@@ -438,7 +438,7 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
...
@@ -438,7 +438,7 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
void
__iomem
*
reg_base
;
void
__iomem
*
reg_base
;
int
bit
,
bank_id
;
int
bit
,
bank_id
;
unsigned
long
sta
;
unsigned
long
sta
;
struct
bcm_kona_gpio_bank
*
bank
=
irq_
get_handler_data
(
irq
);
struct
bcm_kona_gpio_bank
*
bank
=
irq_
desc_get_handler_data
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
chained_irq_enter
(
chip
,
desc
);
chained_irq_enter
(
chip
,
desc
);
...
...
drivers/gpio/gpio-davinci.c
View file @
bcae8880
...
@@ -65,11 +65,11 @@ static struct davinci_gpio_regs __iomem *gpio2regs(unsigned gpio)
...
@@ -65,11 +65,11 @@ static struct davinci_gpio_regs __iomem *gpio2regs(unsigned gpio)
return
ptr
;
return
ptr
;
}
}
static
inline
struct
davinci_gpio_regs
__iomem
*
irq2regs
(
int
irq
)
static
inline
struct
davinci_gpio_regs
__iomem
*
irq2regs
(
struct
irq_data
*
d
)
{
{
struct
davinci_gpio_regs
__iomem
*
g
;
struct
davinci_gpio_regs
__iomem
*
g
;
g
=
(
__force
struct
davinci_gpio_regs
__iomem
*
)
irq_
get_chip_data
(
irq
);
g
=
(
__force
struct
davinci_gpio_regs
__iomem
*
)
irq_
data_get_irq_chip_data
(
d
);
return
g
;
return
g
;
}
}
...
@@ -287,7 +287,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
...
@@ -287,7 +287,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
static
void
gpio_irq_disable
(
struct
irq_data
*
d
)
static
void
gpio_irq_disable
(
struct
irq_data
*
d
)
{
{
struct
davinci_gpio_regs
__iomem
*
g
=
irq2regs
(
d
->
irq
);
struct
davinci_gpio_regs
__iomem
*
g
=
irq2regs
(
d
);
u32
mask
=
(
u32
)
irq_data_get_irq_handler_data
(
d
);
u32
mask
=
(
u32
)
irq_data_get_irq_handler_data
(
d
);
writel_relaxed
(
mask
,
&
g
->
clr_falling
);
writel_relaxed
(
mask
,
&
g
->
clr_falling
);
...
@@ -296,7 +296,7 @@ static void gpio_irq_disable(struct irq_data *d)
...
@@ -296,7 +296,7 @@ static void gpio_irq_disable(struct irq_data *d)
static
void
gpio_irq_enable
(
struct
irq_data
*
d
)
static
void
gpio_irq_enable
(
struct
irq_data
*
d
)
{
{
struct
davinci_gpio_regs
__iomem
*
g
=
irq2regs
(
d
->
irq
);
struct
davinci_gpio_regs
__iomem
*
g
=
irq2regs
(
d
);
u32
mask
=
(
u32
)
irq_data_get_irq_handler_data
(
d
);
u32
mask
=
(
u32
)
irq_data_get_irq_handler_data
(
d
);
unsigned
status
=
irqd_get_trigger_type
(
d
);
unsigned
status
=
irqd_get_trigger_type
(
d
);
...
@@ -327,8 +327,9 @@ static struct irq_chip gpio_irqchip = {
...
@@ -327,8 +327,9 @@ static struct irq_chip gpio_irqchip = {
};
};
static
void
static
void
gpio_irq_handler
(
unsigned
irq
,
struct
irq_desc
*
desc
)
gpio_irq_handler
(
unsigned
__
irq
,
struct
irq_desc
*
desc
)
{
{
unsigned
int
irq
=
irq_desc_get_irq
(
desc
);
struct
davinci_gpio_regs
__iomem
*
g
;
struct
davinci_gpio_regs
__iomem
*
g
;
u32
mask
=
0xffff
;
u32
mask
=
0xffff
;
struct
davinci_gpio_controller
*
d
;
struct
davinci_gpio_controller
*
d
;
...
@@ -396,7 +397,7 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
...
@@ -396,7 +397,7 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger)
struct
davinci_gpio_regs
__iomem
*
g
;
struct
davinci_gpio_regs
__iomem
*
g
;
u32
mask
;
u32
mask
;
d
=
(
struct
davinci_gpio_controller
*
)
data
->
handler_data
;
d
=
(
struct
davinci_gpio_controller
*
)
irq_data_get_irq_handler_data
(
data
)
;
g
=
(
struct
davinci_gpio_regs
__iomem
*
)
d
->
regs
;
g
=
(
struct
davinci_gpio_regs
__iomem
*
)
d
->
regs
;
mask
=
__gpio_mask
(
data
->
irq
-
d
->
gpio_irq
);
mask
=
__gpio_mask
(
data
->
irq
-
d
->
gpio_irq
);
...
@@ -578,15 +579,13 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
...
@@ -578,15 +579,13 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
writel_relaxed
(
~
0
,
&
g
->
clr_falling
);
writel_relaxed
(
~
0
,
&
g
->
clr_falling
);
writel_relaxed
(
~
0
,
&
g
->
clr_rising
);
writel_relaxed
(
~
0
,
&
g
->
clr_rising
);
/* set up all irqs in this bank */
irq_set_chained_handler
(
bank_irq
,
gpio_irq_handler
);
/*
/*
* Each chip handles 32 gpios, and each irq bank consists of 16
* Each chip handles 32 gpios, and each irq bank consists of 16
* gpio irqs. Pass the irq bank's corresponding controller to
* gpio irqs. Pass the irq bank's corresponding controller to
* the chained irq handler.
* the chained irq handler.
*/
*/
irq_set_handler_data
(
bank_irq
,
&
chips
[
gpio
/
32
]);
irq_set_chained_handler_and_data
(
bank_irq
,
gpio_irq_handler
,
&
chips
[
gpio
/
32
]);
binten
|=
BIT
(
bank
);
binten
|=
BIT
(
bank
);
}
}
...
...
drivers/gpio/gpio-dwapb.c
View file @
bcae8880
...
@@ -149,7 +149,7 @@ static u32 dwapb_do_irq(struct dwapb_gpio *gpio)
...
@@ -149,7 +149,7 @@ static u32 dwapb_do_irq(struct dwapb_gpio *gpio)
static
void
dwapb_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
static
void
dwapb_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
{
{
struct
dwapb_gpio
*
gpio
=
irq_
get_handler_data
(
irq
);
struct
dwapb_gpio
*
gpio
=
irq_
desc_get_handler_data
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
dwapb_do_irq
(
gpio
);
dwapb_do_irq
(
gpio
);
...
...
drivers/gpio/gpio-ep93xx.c
View file @
bcae8880
...
@@ -100,13 +100,15 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
...
@@ -100,13 +100,15 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
}
}
}
}
static
void
ep93xx_gpio_f_irq_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
ep93xx_gpio_f_irq_handler
(
unsigned
int
__irq
,
struct
irq_desc
*
desc
)
{
{
/*
/*
* map discontiguous hw irq range to continuous sw irq range:
* map discontiguous hw irq range to continuous sw irq range:
*
*
* IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7})
* IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7})
*/
*/
unsigned
int
irq
=
irq_desc_get_irq
(
desc
);
int
port_f_idx
=
((
irq
+
1
)
&
7
)
^
4
;
/* {19..22,47..50} -> {0..7} */
int
port_f_idx
=
((
irq
+
1
)
&
7
)
^
4
;
/* {19..22,47..50} -> {0..7} */
int
gpio_irq
=
gpio_to_irq
(
EP93XX_GPIO_LINE_F
(
0
))
+
port_f_idx
;
int
gpio_irq
=
gpio_to_irq
(
EP93XX_GPIO_LINE_F
(
0
))
+
port_f_idx
;
...
@@ -208,7 +210,7 @@ static int ep93xx_gpio_irq_type(struct irq_data *d, unsigned int type)
...
@@ -208,7 +210,7 @@ static int ep93xx_gpio_irq_type(struct irq_data *d, unsigned int type)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
__irq_set_handler_locked
(
d
->
irq
,
handler
);
irq_set_handler_locked
(
d
,
handler
);
gpio_int_enabled
[
port
]
|=
port_mask
;
gpio_int_enabled
[
port
]
|=
port_mask
;
...
...
drivers/gpio/gpio-mpc8xxx.c
View file @
bcae8880
...
@@ -396,8 +396,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)
...
@@ -396,8 +396,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)
out_be32
(
mm_gc
->
regs
+
GPIO_IER
,
0xffffffff
);
out_be32
(
mm_gc
->
regs
+
GPIO_IER
,
0xffffffff
);
out_be32
(
mm_gc
->
regs
+
GPIO_IMR
,
0
);
out_be32
(
mm_gc
->
regs
+
GPIO_IMR
,
0
);
irq_set_
handler_data
(
mpc8xxx_gc
->
irqn
,
mpc8xxx_gc
);
irq_set_
chained_handler_and_data
(
mpc8xxx_gc
->
irqn
,
irq_set_chained_handler
(
mpc8xxx_gc
->
irqn
,
mpc8xxx_gpio_irq_cascade
);
mpc8xxx_gpio_irq_cascade
,
mpc8xxx_gc
);
return
0
;
return
0
;
}
}
...
@@ -407,8 +407,7 @@ static int mpc8xxx_remove(struct platform_device *pdev)
...
@@ -407,8 +407,7 @@ static int mpc8xxx_remove(struct platform_device *pdev)
struct
mpc8xxx_gpio_chip
*
mpc8xxx_gc
=
platform_get_drvdata
(
pdev
);
struct
mpc8xxx_gpio_chip
*
mpc8xxx_gc
=
platform_get_drvdata
(
pdev
);
if
(
mpc8xxx_gc
->
irq
)
{
if
(
mpc8xxx_gc
->
irq
)
{
irq_set_handler_data
(
mpc8xxx_gc
->
irqn
,
NULL
);
irq_set_chained_handler_and_data
(
mpc8xxx_gc
->
irqn
,
NULL
,
NULL
);
irq_set_chained_handler
(
mpc8xxx_gc
->
irqn
,
NULL
);
irq_domain_remove
(
mpc8xxx_gc
->
irq
);
irq_domain_remove
(
mpc8xxx_gc
->
irq
);
}
}
...
...
drivers/gpio/gpio-msm-v2.c
View file @
bcae8880
...
@@ -187,14 +187,6 @@ static int msm_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
...
@@ -187,14 +187,6 @@ static int msm_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
return
irq_create_mapping
(
domain
,
offset
);
return
irq_create_mapping
(
domain
,
offset
);
}
}
static
inline
int
msm_irq_to_gpio
(
struct
gpio_chip
*
chip
,
unsigned
irq
)
{
struct
irq_data
*
irq_data
=
irq_get_irq_data
(
irq
);
return
irq_data
->
hwirq
;
}
/* For dual-edge interrupts in software, since the hardware has no
/* For dual-edge interrupts in software, since the hardware has no
* such support:
* such support:
*
*
...
@@ -238,7 +230,7 @@ static void msm_gpio_update_dual_edge_pos(unsigned gpio)
...
@@ -238,7 +230,7 @@ static void msm_gpio_update_dual_edge_pos(unsigned gpio)
static
void
msm_gpio_irq_ack
(
struct
irq_data
*
d
)
static
void
msm_gpio_irq_ack
(
struct
irq_data
*
d
)
{
{
int
gpio
=
msm_irq_to_gpio
(
&
msm_gpio
.
gpio_chip
,
d
->
irq
)
;
int
gpio
=
d
->
hwirq
;
writel
(
BIT
(
INTR_STATUS
),
GPIO_INTR_STATUS
(
gpio
));
writel
(
BIT
(
INTR_STATUS
),
GPIO_INTR_STATUS
(
gpio
));
if
(
test_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
))
if
(
test_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
))
...
@@ -247,8 +239,8 @@ static void msm_gpio_irq_ack(struct irq_data *d)
...
@@ -247,8 +239,8 @@ static void msm_gpio_irq_ack(struct irq_data *d)
static
void
msm_gpio_irq_mask
(
struct
irq_data
*
d
)
static
void
msm_gpio_irq_mask
(
struct
irq_data
*
d
)
{
{
int
gpio
=
msm_irq_to_gpio
(
&
msm_gpio
.
gpio_chip
,
d
->
irq
);
unsigned
long
irq_flags
;
unsigned
long
irq_flags
;
int
gpio
=
d
->
hwirq
;
spin_lock_irqsave
(
&
tlmm_lock
,
irq_flags
);
spin_lock_irqsave
(
&
tlmm_lock
,
irq_flags
);
writel
(
TARGET_PROC_NONE
,
GPIO_INTR_CFG_SU
(
gpio
));
writel
(
TARGET_PROC_NONE
,
GPIO_INTR_CFG_SU
(
gpio
));
...
@@ -259,8 +251,8 @@ static void msm_gpio_irq_mask(struct irq_data *d)
...
@@ -259,8 +251,8 @@ static void msm_gpio_irq_mask(struct irq_data *d)
static
void
msm_gpio_irq_unmask
(
struct
irq_data
*
d
)
static
void
msm_gpio_irq_unmask
(
struct
irq_data
*
d
)
{
{
int
gpio
=
msm_irq_to_gpio
(
&
msm_gpio
.
gpio_chip
,
d
->
irq
);
unsigned
long
irq_flags
;
unsigned
long
irq_flags
;
int
gpio
=
d
->
hwirq
;
spin_lock_irqsave
(
&
tlmm_lock
,
irq_flags
);
spin_lock_irqsave
(
&
tlmm_lock
,
irq_flags
);
__set_bit
(
gpio
,
msm_gpio
.
enabled_irqs
);
__set_bit
(
gpio
,
msm_gpio
.
enabled_irqs
);
...
@@ -271,8 +263,8 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
...
@@ -271,8 +263,8 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
static
int
msm_gpio_irq_set_type
(
struct
irq_data
*
d
,
unsigned
int
flow_type
)
static
int
msm_gpio_irq_set_type
(
struct
irq_data
*
d
,
unsigned
int
flow_type
)
{
{
int
gpio
=
msm_irq_to_gpio
(
&
msm_gpio
.
gpio_chip
,
d
->
irq
);
unsigned
long
irq_flags
;
unsigned
long
irq_flags
;
int
gpio
=
d
->
hwirq
;
uint32_t
bits
;
uint32_t
bits
;
spin_lock_irqsave
(
&
tlmm_lock
,
irq_flags
);
spin_lock_irqsave
(
&
tlmm_lock
,
irq_flags
);
...
@@ -281,14 +273,14 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type)
...
@@ -281,14 +273,14 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type)
if
(
flow_type
&
IRQ_TYPE_EDGE_BOTH
)
{
if
(
flow_type
&
IRQ_TYPE_EDGE_BOTH
)
{
bits
|=
BIT
(
INTR_DECT_CTL
);
bits
|=
BIT
(
INTR_DECT_CTL
);
__irq_set_handler_locked
(
d
->
irq
,
handle_edge_irq
);
irq_set_handler_locked
(
d
,
handle_edge_irq
);
if
((
flow_type
&
IRQ_TYPE_EDGE_BOTH
)
==
IRQ_TYPE_EDGE_BOTH
)
if
((
flow_type
&
IRQ_TYPE_EDGE_BOTH
)
==
IRQ_TYPE_EDGE_BOTH
)
__set_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
);
__set_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
);
else
else
__clear_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
);
__clear_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
);
}
else
{
}
else
{
bits
&=
~
BIT
(
INTR_DECT_CTL
);
bits
&=
~
BIT
(
INTR_DECT_CTL
);
__irq_set_handler_locked
(
d
->
irq
,
handle_level_irq
);
irq_set_handler_locked
(
d
,
handle_level_irq
);
__clear_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
);
__clear_bit
(
gpio
,
msm_gpio
.
dual_edge_irqs
);
}
}
...
@@ -331,7 +323,7 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)
...
@@ -331,7 +323,7 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)
static
int
msm_gpio_irq_set_wake
(
struct
irq_data
*
d
,
unsigned
int
on
)
static
int
msm_gpio_irq_set_wake
(
struct
irq_data
*
d
,
unsigned
int
on
)
{
{
int
gpio
=
msm_irq_to_gpio
(
&
msm_gpio
.
gpio_chip
,
d
->
irq
)
;
int
gpio
=
d
->
hwirq
;
if
(
on
)
{
if
(
on
)
{
if
(
bitmap_empty
(
msm_gpio
.
wake_irqs
,
MAX_NR_GPIO
))
if
(
bitmap_empty
(
msm_gpio
.
wake_irqs
,
MAX_NR_GPIO
))
...
...
drivers/gpio/gpio-mvebu.c
View file @
bcae8880
...
@@ -458,9 +458,9 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
...
@@ -458,9 +458,9 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, unsigned int type)
return
0
;
return
0
;
}
}
static
void
mvebu_gpio_irq_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
mvebu_gpio_irq_handler
(
unsigned
int
__
irq
,
struct
irq_desc
*
desc
)
{
{
struct
mvebu_gpio_chip
*
mvchip
=
irq_
get_handler_data
(
irq
);
struct
mvebu_gpio_chip
*
mvchip
=
irq_
desc_get_handler_data
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
u32
cause
,
type
;
u32
cause
,
type
;
int
i
;
int
i
;
...
@@ -787,8 +787,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
...
@@ -787,8 +787,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
if
(
irq
<
0
)
if
(
irq
<
0
)
continue
;
continue
;
irq_set_
handler_data
(
irq
,
mvchip
);
irq_set_
chained_handler_and_data
(
irq
,
mvebu_gpio_irq_handler
,
irq_set_chained_handler
(
irq
,
mvebu_gpio_irq_handler
);
mvchip
);
}
}
mvchip
->
irqbase
=
irq_alloc_descs
(
-
1
,
0
,
ngpios
,
-
1
);
mvchip
->
irqbase
=
irq_alloc_descs
(
-
1
,
0
,
ngpios
,
-
1
);
...
...
drivers/gpio/gpio-mxc.c
View file @
bcae8880
...
@@ -275,8 +275,8 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat)
...
@@ -275,8 +275,8 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat)
static
void
mx3_gpio_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
static
void
mx3_gpio_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
{
{
u32
irq_stat
;
u32
irq_stat
;
struct
mxc_gpio_port
*
port
=
irq_
get_handler_data
(
irq
);
struct
mxc_gpio_port
*
port
=
irq_
desc_get_handler_data
(
desc
);
struct
irq_chip
*
chip
=
irq_
get_chip
(
irq
);
struct
irq_chip
*
chip
=
irq_
desc_get_chip
(
desc
);
chained_irq_enter
(
chip
,
desc
);
chained_irq_enter
(
chip
,
desc
);
...
@@ -292,7 +292,7 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
...
@@ -292,7 +292,7 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc)
{
{
u32
irq_msk
,
irq_stat
;
u32
irq_msk
,
irq_stat
;
struct
mxc_gpio_port
*
port
;
struct
mxc_gpio_port
*
port
;
struct
irq_chip
*
chip
=
irq_
get_chip
(
irq
);
struct
irq_chip
*
chip
=
irq_
desc_get_chip
(
desc
);
chained_irq_enter
(
chip
,
desc
);
chained_irq_enter
(
chip
,
desc
);
...
...
drivers/gpio/gpio-mxs.c
View file @
bcae8880
...
@@ -157,7 +157,7 @@ static void mxs_flip_edge(struct mxs_gpio_port *port, u32 gpio)
...
@@ -157,7 +157,7 @@ static void mxs_flip_edge(struct mxs_gpio_port *port, u32 gpio)
static
void
mxs_gpio_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
static
void
mxs_gpio_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
{
{
u32
irq_stat
;
u32
irq_stat
;
struct
mxs_gpio_port
*
port
=
irq_
get_handler_data
(
irq
);
struct
mxs_gpio_port
*
port
=
irq_
desc_get_handler_data
(
desc
);
desc
->
irq_data
.
chip
->
irq_ack
(
&
desc
->
irq_data
);
desc
->
irq_data
.
chip
->
irq_ack
(
&
desc
->
irq_data
);
...
...
drivers/gpio/gpio-omap.c
View file @
bcae8880
...
@@ -511,9 +511,9 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
...
@@ -511,9 +511,9 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
spin_unlock_irqrestore
(
&
bank
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
bank
->
lock
,
flags
);
if
(
type
&
(
IRQ_TYPE_LEVEL_LOW
|
IRQ_TYPE_LEVEL_HIGH
))
if
(
type
&
(
IRQ_TYPE_LEVEL_LOW
|
IRQ_TYPE_LEVEL_HIGH
))
__irq_set_handler_locked
(
d
->
irq
,
handle_level_irq
);
irq_set_handler_locked
(
d
,
handle_level_irq
);
else
if
(
type
&
(
IRQ_TYPE_EDGE_FALLING
|
IRQ_TYPE_EDGE_RISING
))
else
if
(
type
&
(
IRQ_TYPE_EDGE_FALLING
|
IRQ_TYPE_EDGE_RISING
))
__irq_set_handler_locked
(
d
->
irq
,
handle_edge_irq
);
irq_set_handler_locked
(
d
,
handle_edge_irq
);
return
0
;
return
0
;
...
@@ -714,7 +714,7 @@ static void omap_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
...
@@ -714,7 +714,7 @@ static void omap_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
struct
gpio_bank
*
bank
;
struct
gpio_bank
*
bank
;
int
unmasked
=
0
;
int
unmasked
=
0
;
struct
irq_chip
*
irqchip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
irqchip
=
irq_desc_get_chip
(
desc
);
struct
gpio_chip
*
chip
=
irq_
get_handler_data
(
irq
);
struct
gpio_chip
*
chip
=
irq_
desc_get_handler_data
(
desc
);
chained_irq_enter
(
irqchip
,
desc
);
chained_irq_enter
(
irqchip
,
desc
);
...
...
drivers/gpio/gpio-pch.c
View file @
bcae8880
...
@@ -281,9 +281,9 @@ static int pch_irq_type(struct irq_data *d, unsigned int type)
...
@@ -281,9 +281,9 @@ static int pch_irq_type(struct irq_data *d, unsigned int type)
/* And the handler */
/* And the handler */
if
(
type
&
(
IRQ_TYPE_LEVEL_LOW
|
IRQ_TYPE_LEVEL_HIGH
))
if
(
type
&
(
IRQ_TYPE_LEVEL_LOW
|
IRQ_TYPE_LEVEL_HIGH
))
__irq_set_handler_locked
(
d
->
irq
,
handle_level_irq
);
irq_set_handler_locked
(
d
,
handle_level_irq
);
else
if
(
type
&
(
IRQ_TYPE_EDGE_FALLING
|
IRQ_TYPE_EDGE_RISING
))
else
if
(
type
&
(
IRQ_TYPE_EDGE_FALLING
|
IRQ_TYPE_EDGE_RISING
))
__irq_set_handler_locked
(
d
->
irq
,
handle_edge_irq
);
irq_set_handler_locked
(
d
,
handle_edge_irq
);
unlock:
unlock:
spin_unlock_irqrestore
(
&
chip
->
spinlock
,
flags
);
spin_unlock_irqrestore
(
&
chip
->
spinlock
,
flags
);
...
...
drivers/gpio/gpio-sa1100.c
View file @
bcae8880
...
@@ -173,9 +173,9 @@ static struct irq_domain *sa1100_gpio_irqdomain;
...
@@ -173,9 +173,9 @@ static struct irq_domain *sa1100_gpio_irqdomain;
* and call the handler.
* and call the handler.
*/
*/
static
void
static
void
sa1100_gpio_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
sa1100_gpio_handler
(
unsigned
int
__
irq
,
struct
irq_desc
*
desc
)
{
{
unsigned
int
mask
;
unsigned
int
irq
,
mask
;
mask
=
GEDR
;
mask
=
GEDR
;
do
{
do
{
...
...
drivers/gpio/gpio-tegra.c
View file @
bcae8880
...
@@ -252,9 +252,9 @@ static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type)
...
@@ -252,9 +252,9 @@ static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type)
tegra_gpio_enable
(
gpio
);
tegra_gpio_enable
(
gpio
);
if
(
type
&
(
IRQ_TYPE_LEVEL_LOW
|
IRQ_TYPE_LEVEL_HIGH
))
if
(
type
&
(
IRQ_TYPE_LEVEL_LOW
|
IRQ_TYPE_LEVEL_HIGH
))
__irq_set_handler_locked
(
d
->
irq
,
handle_level_irq
);
irq_set_handler_locked
(
d
,
handle_level_irq
);
else
if
(
type
&
(
IRQ_TYPE_EDGE_FALLING
|
IRQ_TYPE_EDGE_RISING
))
else
if
(
type
&
(
IRQ_TYPE_EDGE_FALLING
|
IRQ_TYPE_EDGE_RISING
))
__irq_set_handler_locked
(
d
->
irq
,
handle_edge_irq
);
irq_set_handler_locked
(
d
,
handle_edge_irq
);
return
0
;
return
0
;
}
}
...
@@ -268,16 +268,14 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
...
@@ -268,16 +268,14 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
static
void
tegra_gpio_irq_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
tegra_gpio_irq_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
{
{
struct
tegra_gpio_bank
*
bank
;
int
port
;
int
port
;
int
pin
;
int
pin
;
int
unmasked
=
0
;
int
unmasked
=
0
;
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
struct
tegra_gpio_bank
*
bank
=
irq_desc_get_handler_data
(
desc
);
chained_irq_enter
(
chip
,
desc
);
chained_irq_enter
(
chip
,
desc
);
bank
=
irq_get_handler_data
(
irq
);
for
(
port
=
0
;
port
<
4
;
port
++
)
{
for
(
port
=
0
;
port
<
4
;
port
++
)
{
int
gpio
=
tegra_gpio_compose
(
bank
->
bank
,
port
,
0
);
int
gpio
=
tegra_gpio_compose
(
bank
->
bank
,
port
,
0
);
unsigned
long
sta
=
tegra_gpio_readl
(
GPIO_INT_STA
(
gpio
))
&
unsigned
long
sta
=
tegra_gpio_readl
(
GPIO_INT_STA
(
gpio
))
&
...
...
drivers/gpio/gpio-timberdale.c
View file @
bcae8880
...
@@ -194,11 +194,12 @@ static int timbgpio_irq_type(struct irq_data *d, unsigned trigger)
...
@@ -194,11 +194,12 @@ static int timbgpio_irq_type(struct irq_data *d, unsigned trigger)
static
void
timbgpio_irq
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
timbgpio_irq
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
{
{
struct
timbgpio
*
tgpio
=
irq_get_handler_data
(
irq
);
struct
timbgpio
*
tgpio
=
irq_desc_get_handler_data
(
desc
);
struct
irq_data
*
data
=
irq_desc_get_irq_data
(
desc
);
unsigned
long
ipr
;
unsigned
long
ipr
;
int
offset
;
int
offset
;
d
esc
->
irq_data
.
chip
->
irq_ack
(
irq_get_irq_data
(
irq
)
);
d
ata
->
chip
->
irq_ack
(
data
);
ipr
=
ioread32
(
tgpio
->
membase
+
TGPIO_IPR
);
ipr
=
ioread32
(
tgpio
->
membase
+
TGPIO_IPR
);
iowrite32
(
ipr
,
tgpio
->
membase
+
TGPIO_ICR
);
iowrite32
(
ipr
,
tgpio
->
membase
+
TGPIO_ICR
);
...
@@ -299,8 +300,7 @@ static int timbgpio_probe(struct platform_device *pdev)
...
@@ -299,8 +300,7 @@ static int timbgpio_probe(struct platform_device *pdev)
#endif
#endif
}
}
irq_set_handler_data
(
irq
,
tgpio
);
irq_set_chained_handler_and_data
(
irq
,
timbgpio_irq
,
tgpio
);
irq_set_chained_handler
(
irq
,
timbgpio_irq
);
return
0
;
return
0
;
}
}
...
...
drivers/gpio/gpio-tz1090.c
View file @
bcae8880
...
@@ -510,8 +510,8 @@ static int tz1090_gpio_bank_probe(struct tz1090_gpio_bank_info *info)
...
@@ -510,8 +510,8 @@ static int tz1090_gpio_bank_probe(struct tz1090_gpio_bank_info *info)
gc
->
chip_types
[
1
].
chip
.
flags
=
IRQCHIP_MASK_ON_SUSPEND
;
gc
->
chip_types
[
1
].
chip
.
flags
=
IRQCHIP_MASK_ON_SUSPEND
;
/* Setup chained handler for this GPIO bank */
/* Setup chained handler for this GPIO bank */
irq_set_
handler_data
(
bank
->
irq
,
bank
);
irq_set_
chained_handler_and_data
(
bank
->
irq
,
tz1090_gpio_irq_handler
,
irq_set_chained_handler
(
bank
->
irq
,
tz1090_gpio_irq_handler
);
bank
);
return
0
;
return
0
;
}
}
...
...
drivers/gpio/gpio-vf610.c
View file @
bcae8880
...
@@ -120,7 +120,7 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
...
@@ -120,7 +120,7 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
static
void
vf610_gpio_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
static
void
vf610_gpio_irq_handler
(
u32
irq
,
struct
irq_desc
*
desc
)
{
{
struct
vf610_gpio_port
*
port
=
irq_
get_handler_data
(
irq
);
struct
vf610_gpio_port
*
port
=
irq_
desc_get_handler_data
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
chip
=
irq_desc_get_chip
(
desc
);
int
pin
;
int
pin
;
unsigned
long
irq_isfr
;
unsigned
long
irq_isfr
;
...
...
drivers/gpio/gpio-zynq.c
View file @
bcae8880
...
@@ -441,10 +441,10 @@ static int zynq_gpio_set_irq_type(struct irq_data *irq_data, unsigned int type)
...
@@ -441,10 +441,10 @@ static int zynq_gpio_set_irq_type(struct irq_data *irq_data, unsigned int type)
gpio
->
base_addr
+
ZYNQ_GPIO_INTANY_OFFSET
(
bank_num
));
gpio
->
base_addr
+
ZYNQ_GPIO_INTANY_OFFSET
(
bank_num
));
if
(
type
&
IRQ_TYPE_LEVEL_MASK
)
{
if
(
type
&
IRQ_TYPE_LEVEL_MASK
)
{
__irq_set_chip_handler_name_locked
(
irq_data
->
irq
,
irq_set_chip_handler_name_locked
(
irq_data
,
&
zynq_gpio_level_irqchip
,
handle_fasteoi_irq
,
NULL
);
&
zynq_gpio_level_irqchip
,
handle_fasteoi_irq
,
NULL
);
}
else
{
}
else
{
__irq_set_chip_handler_name_locked
(
irq_data
->
irq
,
irq_set_chip_handler_name_locked
(
irq_data
,
&
zynq_gpio_edge_irqchip
,
handle_level_irq
,
NULL
);
&
zynq_gpio_edge_irqchip
,
handle_level_irq
,
NULL
);
}
}
...
@@ -518,7 +518,7 @@ static void zynq_gpio_irqhandler(unsigned int irq, struct irq_desc *desc)
...
@@ -518,7 +518,7 @@ static void zynq_gpio_irqhandler(unsigned int irq, struct irq_desc *desc)
{
{
u32
int_sts
,
int_enb
;
u32
int_sts
,
int_enb
;
unsigned
int
bank_num
;
unsigned
int
bank_num
;
struct
zynq_gpio
*
gpio
=
irq_
get_handler_data
(
irq
);
struct
zynq_gpio
*
gpio
=
irq_
desc_get_handler_data
(
desc
);
struct
irq_chip
*
irqchip
=
irq_desc_get_chip
(
desc
);
struct
irq_chip
*
irqchip
=
irq_desc_get_chip
(
desc
);
chained_irq_enter
(
irqchip
,
desc
);
chained_irq_enter
(
irqchip
,
desc
);
...
...
drivers/gpio/gpiolib.c
View file @
bcae8880
...
@@ -446,8 +446,8 @@ void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,
...
@@ -446,8 +446,8 @@ void gpiochip_set_chained_irqchip(struct gpio_chip *gpiochip,
* The parent irqchip is already using the chip_data for this
* The parent irqchip is already using the chip_data for this
* irqchip, so our callbacks simply use the handler_data.
* irqchip, so our callbacks simply use the handler_data.
*/
*/
irq_set_
handler_data
(
parent_irq
,
gpiochip
);
irq_set_
chained_handler_and_data
(
parent_irq
,
parent_handler
,
irq_set_chained_handler
(
parent_irq
,
parent_handler
);
gpiochip
);
gpiochip
->
irq_parent
=
parent_irq
;
gpiochip
->
irq_parent
=
parent_irq
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment