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
f735aa27
Commit
f735aa27
authored
Sep 03, 2016
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/fix/cache' into regmap-linus
parents
3eab887a
815806e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
drivers/base/regmap/regcache.c
drivers/base/regmap/regcache.c
+3
-2
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+2
-0
No files found.
drivers/base/regmap/regcache.c
View file @
f735aa27
...
...
@@ -38,10 +38,11 @@ static int regcache_hw_init(struct regmap *map)
/* calculate the size of reg_defaults */
for
(
count
=
0
,
i
=
0
;
i
<
map
->
num_reg_defaults_raw
;
i
++
)
if
(
!
regmap_volatile
(
map
,
i
*
map
->
reg_stride
))
if
(
regmap_readable
(
map
,
i
*
map
->
reg_stride
)
&&
!
regmap_volatile
(
map
,
i
*
map
->
reg_stride
))
count
++
;
/* all registers are volatile, so just bypass */
/* all registers are
unreadable or
volatile, so just bypass */
if
(
!
count
)
{
map
->
cache_bypass
=
true
;
return
0
;
...
...
drivers/base/regmap/regmap.c
View file @
f735aa27
...
...
@@ -1474,6 +1474,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
ret
=
map
->
bus
->
write
(
map
->
bus_context
,
buf
,
len
);
kfree
(
buf
);
}
else
if
(
ret
!=
0
&&
!
map
->
cache_bypass
&&
map
->
format
.
parse_val
)
{
regcache_drop_region
(
map
,
reg
,
reg
+
1
);
}
trace_regmap_hw_write_done
(
map
,
reg
,
val_len
/
map
->
format
.
val_bytes
);
...
...
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