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
86776fc1
Commit
86776fc1
authored
Jan 09, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/topic/ack' into regmap-next
parents
eec8ae7a
d3233433
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
drivers/base/regmap/regmap-irq.c
drivers/base/regmap/regmap-irq.c
+3
-3
include/linux/regmap.h
include/linux/regmap.h
+4
-1
No files found.
drivers/base/regmap/regmap-irq.c
View file @
86776fc1
...
@@ -113,7 +113,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
...
@@ -113,7 +113,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
* OR if there is masked interrupt which hasn't been Acked,
* OR if there is masked interrupt which hasn't been Acked,
* it'll be ignored in irq handler, then may introduce irq storm
* it'll be ignored in irq handler, then may introduce irq storm
*/
*/
if
(
d
->
mask_buf
[
i
]
&&
d
->
chip
->
ack_base
)
{
if
(
d
->
mask_buf
[
i
]
&&
(
d
->
chip
->
ack_base
||
d
->
chip
->
use_ack
)
)
{
reg
=
d
->
chip
->
ack_base
+
reg
=
d
->
chip
->
ack_base
+
(
i
*
map
->
reg_stride
*
d
->
irq_reg_stride
);
(
i
*
map
->
reg_stride
*
d
->
irq_reg_stride
);
ret
=
regmap_write
(
map
,
reg
,
d
->
mask_buf
[
i
]);
ret
=
regmap_write
(
map
,
reg
,
d
->
mask_buf
[
i
]);
...
@@ -271,7 +271,7 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
...
@@ -271,7 +271,7 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
for
(
i
=
0
;
i
<
data
->
chip
->
num_regs
;
i
++
)
{
for
(
i
=
0
;
i
<
data
->
chip
->
num_regs
;
i
++
)
{
data
->
status_buf
[
i
]
&=
~
data
->
mask_buf
[
i
];
data
->
status_buf
[
i
]
&=
~
data
->
mask_buf
[
i
];
if
(
data
->
status_buf
[
i
]
&&
chip
->
ack_base
)
{
if
(
data
->
status_buf
[
i
]
&&
(
chip
->
ack_base
||
chip
->
use_ack
)
)
{
reg
=
chip
->
ack_base
+
reg
=
chip
->
ack_base
+
(
i
*
map
->
reg_stride
*
data
->
irq_reg_stride
);
(
i
*
map
->
reg_stride
*
data
->
irq_reg_stride
);
ret
=
regmap_write
(
map
,
reg
,
data
->
status_buf
[
i
]);
ret
=
regmap_write
(
map
,
reg
,
data
->
status_buf
[
i
]);
...
@@ -448,7 +448,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
...
@@ -448,7 +448,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
goto
err_alloc
;
goto
err_alloc
;
}
}
if
(
d
->
status_buf
[
i
]
&&
chip
->
ack_base
)
{
if
(
d
->
status_buf
[
i
]
&&
(
chip
->
ack_base
||
chip
->
use_ack
)
)
{
reg
=
chip
->
ack_base
+
reg
=
chip
->
ack_base
+
(
i
*
map
->
reg_stride
*
d
->
irq_reg_stride
);
(
i
*
map
->
reg_stride
*
d
->
irq_reg_stride
);
ret
=
regmap_write
(
map
,
reg
,
ret
=
regmap_write
(
map
,
reg
,
...
...
include/linux/regmap.h
View file @
86776fc1
...
@@ -497,11 +497,13 @@ struct regmap_irq {
...
@@ -497,11 +497,13 @@ struct regmap_irq {
*
*
* @status_base: Base status register address.
* @status_base: Base status register address.
* @mask_base: Base mask register address.
* @mask_base: Base mask register address.
* @ack_base: Base ack address. If zero then the chip is clear on read.
* @ack_base: Base ack address. If zero then the chip is clear on read.
* Using zero value is possible with @use_ack bit.
* @wake_base: Base address for wake enables. If zero unsupported.
* @wake_base: Base address for wake enables. If zero unsupported.
* @irq_reg_stride: Stride to use for chips where registers are not contiguous.
* @irq_reg_stride: Stride to use for chips where registers are not contiguous.
* @init_ack_masked: Ack all masked interrupts once during initalization.
* @init_ack_masked: Ack all masked interrupts once during initalization.
* @mask_invert: Inverted mask register: cleared bits are masked out.
* @mask_invert: Inverted mask register: cleared bits are masked out.
* @use_ack: Use @ack register even if it is zero.
* @wake_invert: Inverted wake register: cleared bits are wake enabled.
* @wake_invert: Inverted wake register: cleared bits are wake enabled.
* @runtime_pm: Hold a runtime PM lock on the device when accessing it.
* @runtime_pm: Hold a runtime PM lock on the device when accessing it.
*
*
...
@@ -520,6 +522,7 @@ struct regmap_irq_chip {
...
@@ -520,6 +522,7 @@ struct regmap_irq_chip {
unsigned
int
irq_reg_stride
;
unsigned
int
irq_reg_stride
;
bool
init_ack_masked
:
1
;
bool
init_ack_masked
:
1
;
bool
mask_invert
:
1
;
bool
mask_invert
:
1
;
bool
use_ack
:
1
;
bool
wake_invert
:
1
;
bool
wake_invert
:
1
;
bool
runtime_pm
:
1
;
bool
runtime_pm
:
1
;
...
...
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