Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
c2b164fa
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c2b164fa
编写于
11月 08, 2011
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'topic/cache' of
git://opensource.wolfsonmicro.com/regmap
into for-3.3
上级
e94de1e8
8ae0d7e8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
1 deletion
+24
-1
drivers/base/regmap/internal.h
drivers/base/regmap/internal.h
+1
-0
drivers/base/regmap/regcache.c
drivers/base/regmap/regcache.c
+19
-0
drivers/base/regmap/regmap.c
drivers/base/regmap/regmap.c
+3
-1
include/linux/regmap.h
include/linux/regmap.h
+1
-0
未找到文件。
drivers/base/regmap/internal.h
浏览文件 @
c2b164fa
...
@@ -74,6 +74,7 @@ struct regmap {
...
@@ -74,6 +74,7 @@ struct regmap {
struct
reg_default
*
reg_defaults
;
struct
reg_default
*
reg_defaults
;
const
void
*
reg_defaults_raw
;
const
void
*
reg_defaults_raw
;
void
*
cache
;
void
*
cache
;
bool
cache_dirty
;
};
};
struct
regcache_ops
{
struct
regcache_ops
{
...
...
drivers/base/regmap/regcache.c
浏览文件 @
c2b164fa
...
@@ -241,6 +241,8 @@ int regcache_sync(struct regmap *map)
...
@@ -241,6 +241,8 @@ int regcache_sync(struct regmap *map)
map
->
cache_ops
->
name
);
map
->
cache_ops
->
name
);
name
=
map
->
cache_ops
->
name
;
name
=
map
->
cache_ops
->
name
;
trace_regcache_sync
(
map
->
dev
,
name
,
"start"
);
trace_regcache_sync
(
map
->
dev
,
name
,
"start"
);
if
(
!
map
->
cache_dirty
)
goto
out
;
if
(
map
->
cache_ops
->
sync
)
{
if
(
map
->
cache_ops
->
sync
)
{
ret
=
map
->
cache_ops
->
sync
(
map
);
ret
=
map
->
cache_ops
->
sync
(
map
);
}
else
{
}
else
{
...
@@ -290,6 +292,23 @@ void regcache_cache_only(struct regmap *map, bool enable)
...
@@ -290,6 +292,23 @@ void regcache_cache_only(struct regmap *map, bool enable)
}
}
EXPORT_SYMBOL_GPL
(
regcache_cache_only
);
EXPORT_SYMBOL_GPL
(
regcache_cache_only
);
/**
* regcache_mark_dirty: Mark the register cache as dirty
*
* @map: map to mark
*
* Mark the register cache as dirty, for example due to the device
* having been powered down for suspend. If the cache is not marked
* as dirty then the cache sync will be suppressed.
*/
void
regcache_mark_dirty
(
struct
regmap
*
map
)
{
mutex_lock
(
&
map
->
lock
);
map
->
cache_dirty
=
true
;
mutex_unlock
(
&
map
->
lock
);
}
EXPORT_SYMBOL_GPL
(
regcache_mark_dirty
);
/**
/**
* regcache_cache_bypass: Put a register map into cache bypass mode
* regcache_cache_bypass: Put a register map into cache bypass mode
*
*
...
...
drivers/base/regmap/regmap.c
浏览文件 @
c2b164fa
...
@@ -306,8 +306,10 @@ int _regmap_write(struct regmap *map, unsigned int reg,
...
@@ -306,8 +306,10 @@ int _regmap_write(struct regmap *map, unsigned int reg,
ret
=
regcache_write
(
map
,
reg
,
val
);
ret
=
regcache_write
(
map
,
reg
,
val
);
if
(
ret
!=
0
)
if
(
ret
!=
0
)
return
ret
;
return
ret
;
if
(
map
->
cache_only
)
if
(
map
->
cache_only
)
{
map
->
cache_dirty
=
true
;
return
0
;
return
0
;
}
}
}
trace_regmap_reg_write
(
map
->
dev
,
reg
,
val
);
trace_regmap_reg_write
(
map
->
dev
,
reg
,
val
);
...
...
include/linux/regmap.h
浏览文件 @
c2b164fa
...
@@ -143,5 +143,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
...
@@ -143,5 +143,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
int
regcache_sync
(
struct
regmap
*
map
);
int
regcache_sync
(
struct
regmap
*
map
);
void
regcache_cache_only
(
struct
regmap
*
map
,
bool
enable
);
void
regcache_cache_only
(
struct
regmap
*
map
,
bool
enable
);
void
regcache_cache_bypass
(
struct
regmap
*
map
,
bool
enable
);
void
regcache_cache_bypass
(
struct
regmap
*
map
,
bool
enable
);
void
regcache_mark_dirty
(
struct
regmap
*
map
);
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录