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
92afb286
Commit
92afb286
authored
Sep 19, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regmap: Allow drivers to control cache_only flag
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
39a58439
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
drivers/base/regmap/regcache.c
drivers/base/regmap/regcache.c
+18
-0
include/linux/regmap.h
include/linux/regmap.h
+2
-0
No files found.
drivers/base/regmap/regcache.c
View file @
92afb286
...
@@ -240,6 +240,24 @@ int regcache_sync(struct regmap *map)
...
@@ -240,6 +240,24 @@ int regcache_sync(struct regmap *map)
}
}
EXPORT_SYMBOL_GPL
(
regcache_sync
);
EXPORT_SYMBOL_GPL
(
regcache_sync
);
/**
* regcache_cache_only: Put a register map into cache only mode
*
* @map: map to configure
* @cache_only: flag if changes should be written to the hardware
*
* When a register map is marked as cache only writes to the register
* map API will only update the register cache, they will not cause
* any hardware changes. This is useful for allowing portions of
* drivers to act as though the device were functioning as normal when
* it is disabled for power saving reasons.
*/
void
regcache_cache_only
(
struct
regmap
*
map
,
bool
enable
)
{
map
->
cache_only
=
enable
;
}
EXPORT_SYMBOL_GPL
(
regcache_cache_only
);
bool
regcache_set_val
(
void
*
base
,
unsigned
int
idx
,
bool
regcache_set_val
(
void
*
base
,
unsigned
int
idx
,
unsigned
int
val
,
unsigned
int
word_size
)
unsigned
int
val
,
unsigned
int
word_size
)
{
{
...
...
include/linux/regmap.h
View file @
92afb286
...
@@ -141,4 +141,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
...
@@ -141,4 +141,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
unsigned
int
mask
,
unsigned
int
val
);
unsigned
int
mask
,
unsigned
int
val
);
int
regcache_sync
(
struct
regmap
*
map
);
int
regcache_sync
(
struct
regmap
*
map
);
void
regcache_cache_only
(
struct
regmap
*
map
,
bool
enable
);
#endif
#endif
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