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
b3bf36cb
Commit
b3bf36cb
authored
Mar 28, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regmap/topic/core' into regmap-next
parents
6ce6d9c2
53e87f88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
drivers/base/regmap/regmap-debugfs.c
drivers/base/regmap/regmap-debugfs.c
+1
-1
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+10
-7
No files found.
drivers/base/regmap/regmap-debugfs.c
View file @
b3bf36cb
...
...
@@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
debugfs_create_file
(
"range"
,
0400
,
map
->
debugfs
,
map
,
&
regmap_reg_ranges_fops
);
if
(
map
->
max_register
)
{
if
(
map
->
max_register
||
regmap_readable
(
map
,
0
)
)
{
debugfs_create_file
(
"registers"
,
0400
,
map
->
debugfs
,
map
,
&
regmap_map_fops
);
debugfs_create_file
(
"access"
,
0400
,
map
->
debugfs
,
...
...
drivers/base/regmap/regmap.c
View file @
b3bf36cb
...
...
@@ -718,7 +718,7 @@ struct regmap *regmap_init(struct device *dev,
new
->
window_start
=
range_cfg
->
window_start
;
new
->
window_len
=
range_cfg
->
window_len
;
if
(
_regmap_range_add
(
map
,
new
)
==
false
)
{
if
(
!
_regmap_range_add
(
map
,
new
)
)
{
dev_err
(
map
->
dev
,
"Failed to add range %d
\n
"
,
i
);
kfree
(
new
);
goto
err_range
;
...
...
@@ -1736,6 +1736,9 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
if
(
map
->
cache_only
)
return
-
EBUSY
;
if
(
!
regmap_readable
(
map
,
reg
))
return
-
EIO
;
ret
=
map
->
reg_read
(
context
,
reg
,
val
);
if
(
ret
==
0
)
{
#ifdef LOG_DEVICE
...
...
@@ -1966,9 +1969,11 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
if
(
tmp
!=
orig
)
{
ret
=
_regmap_write
(
map
,
reg
,
tmp
);
*
change
=
true
;
if
(
change
)
*
change
=
true
;
}
else
{
*
change
=
false
;
if
(
change
)
*
change
=
false
;
}
return
ret
;
...
...
@@ -1987,11 +1992,10 @@ static int _regmap_update_bits(struct regmap *map, unsigned int reg,
int
regmap_update_bits
(
struct
regmap
*
map
,
unsigned
int
reg
,
unsigned
int
mask
,
unsigned
int
val
)
{
bool
change
;
int
ret
;
map
->
lock
(
map
->
lock_arg
);
ret
=
_regmap_update_bits
(
map
,
reg
,
mask
,
val
,
&
change
);
ret
=
_regmap_update_bits
(
map
,
reg
,
mask
,
val
,
NULL
);
map
->
unlock
(
map
->
lock_arg
);
return
ret
;
...
...
@@ -2016,14 +2020,13 @@ EXPORT_SYMBOL_GPL(regmap_update_bits);
int
regmap_update_bits_async
(
struct
regmap
*
map
,
unsigned
int
reg
,
unsigned
int
mask
,
unsigned
int
val
)
{
bool
change
;
int
ret
;
map
->
lock
(
map
->
lock_arg
);
map
->
async
=
true
;
ret
=
_regmap_update_bits
(
map
,
reg
,
mask
,
val
,
&
change
);
ret
=
_regmap_update_bits
(
map
,
reg
,
mask
,
val
,
NULL
);
map
->
async
=
false
;
...
...
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