Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
88b0357d
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
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看板
提交
88b0357d
编写于
5月 13, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'spi/fix/grant' into spi-linus
上级
0faa3146
3086c9f6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
8 deletion
+11
-8
drivers/spi/spi-atmel.c
drivers/spi/spi-atmel.c
+2
-2
drivers/spi/spi-davinci.c
drivers/spi/spi-davinci.c
+1
-1
drivers/spi/spi.c
drivers/spi/spi.c
+6
-3
include/linux/spi/spi.h
include/linux/spi/spi.h
+2
-2
未找到文件。
drivers/spi/spi-atmel.c
浏览文件 @
88b0357d
...
...
@@ -1408,8 +1408,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
}
/* FIXME implement these protocol options!! */
if
(
xfer
->
speed_hz
)
{
dev_dbg
(
&
spi
->
dev
,
"
no protocol options yet
\n
"
);
if
(
xfer
->
speed_hz
<
spi
->
max_speed_hz
)
{
dev_dbg
(
&
spi
->
dev
,
"
can't change speed in transfer
\n
"
);
return
-
ENOPROTOOPT
;
}
...
...
drivers/spi/spi-davinci.c
浏览文件 @
88b0357d
...
...
@@ -784,7 +784,7 @@ static const struct of_device_id davinci_spi_of_match[] = {
},
{
},
};
MODULE_DEVICE_TABLE
(
of
,
davini_spi_of_match
);
MODULE_DEVICE_TABLE
(
of
,
davin
c
i_spi_of_match
);
/**
* spi_davinci_get_pdata - Get platform data from DTS binding
...
...
drivers/spi/spi.c
浏览文件 @
88b0357d
...
...
@@ -334,7 +334,7 @@ struct spi_device *spi_alloc_device(struct spi_master *master)
spi
->
dev
.
parent
=
&
master
->
dev
;
spi
->
dev
.
bus
=
&
spi_bus_type
;
spi
->
dev
.
release
=
spidev_release
;
spi
->
cs_gpio
=
-
E
INVAL
;
spi
->
cs_gpio
=
-
E
NOENT
;
device_initialize
(
&
spi
->
dev
);
return
spi
;
}
...
...
@@ -1067,8 +1067,11 @@ static int of_spi_register_master(struct spi_master *master)
nb
=
of_gpio_named_count
(
np
,
"cs-gpios"
);
master
->
num_chipselect
=
max
(
nb
,
(
int
)
master
->
num_chipselect
);
if
(
nb
<
1
)
/* Return error only for an incorrectly formed cs-gpios property */
if
(
nb
==
0
||
nb
==
-
ENOENT
)
return
0
;
else
if
(
nb
<
0
)
return
nb
;
cs
=
devm_kzalloc
(
&
master
->
dev
,
sizeof
(
int
)
*
master
->
num_chipselect
,
...
...
@@ -1079,7 +1082,7 @@ static int of_spi_register_master(struct spi_master *master)
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
master
->
num_chipselect
;
i
++
)
cs
[
i
]
=
-
E
INVAL
;
cs
[
i
]
=
-
E
NOENT
;
for
(
i
=
0
;
i
<
nb
;
i
++
)
cs
[
i
]
=
of_get_named_gpio
(
np
,
"cs-gpios"
,
i
);
...
...
include/linux/spi/spi.h
浏览文件 @
88b0357d
...
...
@@ -57,7 +57,7 @@ extern struct bus_type spi_bus_type;
* @modalias: Name of the driver to use with this device, or an alias
* for that name. This appears in the sysfs "modalias" attribute
* for driver coldplugging, and in uevents used for hotplugging
* @cs_gpio: gpio number of the chipselect line (optional, -E
INVAL
when
* @cs_gpio: gpio number of the chipselect line (optional, -E
NOENT
when
* when not using a GPIO line)
*
* A @spi_device is used to interchange data between an SPI slave
...
...
@@ -266,7 +266,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
* queue so the subsystem notifies the driver that it may relax the
* hardware by issuing this call
* @cs_gpios: Array of GPIOs to use as chip select lines; one per CS
* number. Any individual value may be -E
INVAL
for CS lines that
* number. Any individual value may be -E
NOENT
for CS lines that
* are not GPIOs (driven by the SPI controller itself).
*
* Each SPI master controller can communicate with one or more @spi_device
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录