Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
40303764
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看板
提交
40303764
编写于
1月 31, 2018
作者:
V
Vinod Koul
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'topic/device_changes' into for-linus
上级
1eac3218
146b4dbb
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
53 addition
and
0 deletion
+53
-0
drivers/acpi/bus.c
drivers/acpi/bus.c
+18
-0
drivers/acpi/property.c
drivers/acpi/property.c
+8
-0
drivers/base/property.c
drivers/base/property.c
+7
-0
drivers/of/property.c
drivers/of/property.c
+8
-0
include/linux/acpi.h
include/linux/acpi.h
+6
-0
include/linux/fwnode.h
include/linux/fwnode.h
+4
-0
include/linux/property.h
include/linux/property.h
+2
-0
未找到文件。
drivers/acpi/bus.c
浏览文件 @
40303764
...
...
@@ -785,6 +785,24 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
}
EXPORT_SYMBOL_GPL
(
acpi_match_device
);
void
*
acpi_get_match_data
(
const
struct
device
*
dev
)
{
const
struct
acpi_device_id
*
match
;
if
(
!
dev
->
driver
)
return
NULL
;
if
(
!
dev
->
driver
->
acpi_match_table
)
return
NULL
;
match
=
acpi_match_device
(
dev
->
driver
->
acpi_match_table
,
dev
);
if
(
!
match
)
return
NULL
;
return
(
void
*
)
match
->
driver_data
;
}
EXPORT_SYMBOL_GPL
(
acpi_get_match_data
);
int
acpi_match_device_ids
(
struct
acpi_device
*
device
,
const
struct
acpi_device_id
*
ids
)
{
...
...
drivers/acpi/property.c
浏览文件 @
40303764
...
...
@@ -1271,9 +1271,17 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
return
0
;
}
static
void
*
acpi_fwnode_device_get_match_data
(
const
struct
fwnode_handle
*
fwnode
,
const
struct
device
*
dev
)
{
return
acpi_get_match_data
(
dev
);
}
#define DECLARE_ACPI_FWNODE_OPS(ops) \
const struct fwnode_operations ops = { \
.device_is_available = acpi_fwnode_device_is_available, \
.device_get_match_data = acpi_fwnode_device_get_match_data, \
.property_present = acpi_fwnode_property_present, \
.property_read_int_array = \
acpi_fwnode_property_read_int_array, \
...
...
drivers/base/property.c
浏览文件 @
40303764
...
...
@@ -1340,3 +1340,10 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
return
fwnode_call_int_op
(
fwnode
,
graph_parse_endpoint
,
endpoint
);
}
EXPORT_SYMBOL
(
fwnode_graph_parse_endpoint
);
void
*
device_get_match_data
(
struct
device
*
dev
)
{
return
fwnode_call_ptr_op
(
dev_fwnode
(
dev
),
device_get_match_data
,
dev
);
}
EXPORT_SYMBOL_GPL
(
device_get_match_data
);
drivers/of/property.c
浏览文件 @
40303764
...
...
@@ -981,10 +981,18 @@ static int of_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
return
0
;
}
static
void
*
of_fwnode_device_get_match_data
(
const
struct
fwnode_handle
*
fwnode
,
const
struct
device
*
dev
)
{
return
(
void
*
)
of_device_get_match_data
(
dev
);
}
const
struct
fwnode_operations
of_fwnode_ops
=
{
.
get
=
of_fwnode_get
,
.
put
=
of_fwnode_put
,
.
device_is_available
=
of_fwnode_device_is_available
,
.
device_get_match_data
=
of_fwnode_device_get_match_data
,
.
property_present
=
of_fwnode_property_present
,
.
property_read_int_array
=
of_fwnode_property_read_int_array
,
.
property_read_string_array
=
of_fwnode_property_read_string_array
,
...
...
include/linux/acpi.h
浏览文件 @
40303764
...
...
@@ -584,6 +584,7 @@ extern int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *),
const
struct
acpi_device_id
*
acpi_match_device
(
const
struct
acpi_device_id
*
ids
,
const
struct
device
*
dev
);
void
*
acpi_get_match_data
(
const
struct
device
*
dev
);
extern
bool
acpi_driver_match_device
(
struct
device
*
dev
,
const
struct
device_driver
*
drv
);
int
acpi_device_uevent_modalias
(
struct
device
*
,
struct
kobj_uevent_env
*
);
...
...
@@ -755,6 +756,11 @@ static inline const struct acpi_device_id *acpi_match_device(
return
NULL
;
}
static
inline
void
*
acpi_get_match_data
(
const
struct
device
*
dev
)
{
return
NULL
;
}
static
inline
bool
acpi_driver_match_device
(
struct
device
*
dev
,
const
struct
device_driver
*
drv
)
{
...
...
include/linux/fwnode.h
浏览文件 @
40303764
...
...
@@ -15,6 +15,7 @@
#include <linux/types.h>
struct
fwnode_operations
;
struct
device
;
struct
fwnode_handle
{
struct
fwnode_handle
*
secondary
;
...
...
@@ -51,6 +52,7 @@ struct fwnode_reference_args {
* struct fwnode_operations - Operations for fwnode interface
* @get: Get a reference to an fwnode.
* @put: Put a reference to an fwnode.
* @device_get_match_data: Return the device driver match data.
* @property_present: Return true if a property is present.
* @property_read_integer_array: Read an array of integer properties. Return
* zero on success, a negative error code
...
...
@@ -71,6 +73,8 @@ struct fwnode_operations {
struct
fwnode_handle
*
(
*
get
)(
struct
fwnode_handle
*
fwnode
);
void
(
*
put
)(
struct
fwnode_handle
*
fwnode
);
bool
(
*
device_is_available
)(
const
struct
fwnode_handle
*
fwnode
);
void
*
(
*
device_get_match_data
)(
const
struct
fwnode_handle
*
fwnode
,
const
struct
device
*
dev
);
bool
(
*
property_present
)(
const
struct
fwnode_handle
*
fwnode
,
const
char
*
propname
);
int
(
*
property_read_int_array
)(
const
struct
fwnode_handle
*
fwnode
,
...
...
include/linux/property.h
浏览文件 @
40303764
...
...
@@ -275,6 +275,8 @@ bool device_dma_supported(struct device *dev);
enum
dev_dma_attr
device_get_dma_attr
(
struct
device
*
dev
);
void
*
device_get_match_data
(
struct
device
*
dev
);
int
device_get_phy_mode
(
struct
device
*
dev
);
void
*
device_get_mac_address
(
struct
device
*
dev
,
char
*
addr
,
int
alen
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录