Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
63e5dcc0
K
Kernel
项目概览
openeuler
/
Kernel
大约 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
63e5dcc0
编写于
11月 27, 2020
作者:
M
Matthias Brugger
浏览文件
操作
浏览文件
下载
差异文件
Merge tag 'ib-mfd-mediatek-v5.11' into HEAD
Immutable branch between MFD and MediaTek due for the v5.11 merge window
上级
cc7a16b1
86b9d170
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
0 deletion
+29
-0
drivers/mfd/syscon.c
drivers/mfd/syscon.c
+18
-0
include/linux/mfd/syscon.h
include/linux/mfd/syscon.h
+11
-0
未找到文件。
drivers/mfd/syscon.c
浏览文件 @
63e5dcc0
...
...
@@ -255,6 +255,24 @@ struct regmap *syscon_regmap_lookup_by_phandle_args(struct device_node *np,
}
EXPORT_SYMBOL_GPL
(
syscon_regmap_lookup_by_phandle_args
);
/*
* It behaves the same as syscon_regmap_lookup_by_phandle() except where
* there is no regmap phandle. In this case, instead of returning -ENODEV,
* the function returns NULL.
*/
struct
regmap
*
syscon_regmap_lookup_by_phandle_optional
(
struct
device_node
*
np
,
const
char
*
property
)
{
struct
regmap
*
regmap
;
regmap
=
syscon_regmap_lookup_by_phandle
(
np
,
property
);
if
(
IS_ERR
(
regmap
)
&&
PTR_ERR
(
regmap
)
==
-
ENODEV
)
return
NULL
;
return
regmap
;
}
EXPORT_SYMBOL_GPL
(
syscon_regmap_lookup_by_phandle_optional
);
static
int
syscon_probe
(
struct
platform_device
*
pdev
)
{
struct
device
*
dev
=
&
pdev
->
dev
;
...
...
include/linux/mfd/syscon.h
浏览文件 @
63e5dcc0
...
...
@@ -28,6 +28,9 @@ extern struct regmap *syscon_regmap_lookup_by_phandle_args(
const
char
*
property
,
int
arg_count
,
unsigned
int
*
out_args
);
extern
struct
regmap
*
syscon_regmap_lookup_by_phandle_optional
(
struct
device_node
*
np
,
const
char
*
property
);
#else
static
inline
struct
regmap
*
device_node_to_regmap
(
struct
device_node
*
np
)
{
...
...
@@ -59,6 +62,14 @@ static inline struct regmap *syscon_regmap_lookup_by_phandle_args(
{
return
ERR_PTR
(
-
ENOTSUPP
);
}
static
inline
struct
regmap
*
syscon_regmap_lookup_by_phandle_optional
(
struct
device_node
*
np
,
const
char
*
property
)
{
return
NULL
;
}
#endif
#endif
/* __LINUX_MFD_SYSCON_H__ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录