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
nexedi
linux
Commits
1801ceaf
Commit
1801ceaf
authored
Aug 31, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/topic/irq' into regmap-next
parents
4ff4eb9e
68622bdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
drivers/base/regmap/regmap-irq.c
drivers/base/regmap/regmap-irq.c
+25
-0
include/linux/regmap.h
include/linux/regmap.h
+7
-3
No files found.
drivers/base/regmap/regmap-irq.c
View file @
1801ceaf
...
...
@@ -418,6 +418,31 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
reg
,
ret
);
goto
err_alloc
;
}
if
(
!
chip
->
init_ack_masked
)
continue
;
/* Ack masked but set interrupts */
reg
=
chip
->
status_base
+
(
i
*
map
->
reg_stride
*
d
->
irq_reg_stride
);
ret
=
regmap_read
(
map
,
reg
,
&
d
->
status_buf
[
i
]);
if
(
ret
!=
0
)
{
dev_err
(
map
->
dev
,
"Failed to read IRQ status: %d
\n
"
,
ret
);
goto
err_alloc
;
}
if
(
d
->
status_buf
[
i
]
&&
chip
->
ack_base
)
{
reg
=
chip
->
ack_base
+
(
i
*
map
->
reg_stride
*
d
->
irq_reg_stride
);
ret
=
regmap_write
(
map
,
reg
,
d
->
status_buf
[
i
]
&
d
->
mask_buf
[
i
]);
if
(
ret
!=
0
)
{
dev_err
(
map
->
dev
,
"Failed to ack 0x%x: %d
\n
"
,
reg
,
ret
);
goto
err_alloc
;
}
}
}
/* Wake is disabled by default */
...
...
include/linux/regmap.h
View file @
1801ceaf
...
...
@@ -471,6 +471,9 @@ struct regmap_irq {
* @ack_base: Base ack address. If zero then the chip is clear on read.
* @wake_base: Base address for wake enables. If zero unsupported.
* @irq_reg_stride: Stride to use for chips where registers are not contiguous.
* @init_ack_masked: Ack all masked interrupts once during initalization.
* @mask_invert: Inverted mask register: cleared bits are masked out.
* @wake_invert: Inverted wake register: cleared bits are wake enabled.
* @runtime_pm: Hold a runtime PM lock on the device when accessing it.
*
* @num_regs: Number of registers in each control bank.
...
...
@@ -486,9 +489,10 @@ struct regmap_irq_chip {
unsigned
int
ack_base
;
unsigned
int
wake_base
;
unsigned
int
irq_reg_stride
;
unsigned
int
mask_invert
;
unsigned
int
wake_invert
;
bool
runtime_pm
;
bool
init_ack_masked
:
1
;
bool
mask_invert
:
1
;
bool
wake_invert
:
1
;
bool
runtime_pm
:
1
;
int
num_regs
;
...
...
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