Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
dd8c26f0
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
dd8c26f0
编写于
10月 25, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'spi/topic/bitbang' into spi-next
上级
52d85ebb
cff93c58
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
6 deletion
+7
-6
drivers/spi/spi-bitbang.c
drivers/spi/spi-bitbang.c
+7
-6
未找到文件。
drivers/spi/spi-bitbang.c
浏览文件 @
dd8c26f0
...
@@ -191,7 +191,7 @@ int spi_bitbang_setup(struct spi_device *spi)
...
@@ -191,7 +191,7 @@ int spi_bitbang_setup(struct spi_device *spi)
bitbang
=
spi_master_get_devdata
(
spi
->
master
);
bitbang
=
spi_master_get_devdata
(
spi
->
master
);
if
(
!
cs
)
{
if
(
!
cs
)
{
cs
=
kzalloc
(
sizeof
*
cs
,
GFP_KERNEL
);
cs
=
kzalloc
(
sizeof
(
*
cs
)
,
GFP_KERNEL
);
if
(
!
cs
)
if
(
!
cs
)
return
-
ENOMEM
;
return
-
ENOMEM
;
spi
->
controller_state
=
cs
;
spi
->
controller_state
=
cs
;
...
@@ -258,7 +258,7 @@ static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
...
@@ -258,7 +258,7 @@ static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
static
int
spi_bitbang_prepare_hardware
(
struct
spi_master
*
spi
)
static
int
spi_bitbang_prepare_hardware
(
struct
spi_master
*
spi
)
{
{
struct
spi_bitbang
*
bitbang
;
struct
spi_bitbang
*
bitbang
;
unsigned
long
flags
;
unsigned
long
flags
;
bitbang
=
spi_master_get_devdata
(
spi
);
bitbang
=
spi_master_get_devdata
(
spi
);
...
@@ -273,7 +273,7 @@ static int spi_bitbang_prepare_hardware(struct spi_master *spi)
...
@@ -273,7 +273,7 @@ static int spi_bitbang_prepare_hardware(struct spi_master *spi)
static
int
spi_bitbang_transfer_one
(
struct
spi_master
*
master
,
static
int
spi_bitbang_transfer_one
(
struct
spi_master
*
master
,
struct
spi_message
*
m
)
struct
spi_message
*
m
)
{
{
struct
spi_bitbang
*
bitbang
;
struct
spi_bitbang
*
bitbang
;
unsigned
nsecs
;
unsigned
nsecs
;
struct
spi_transfer
*
t
=
NULL
;
struct
spi_transfer
*
t
=
NULL
;
unsigned
cs_change
;
unsigned
cs_change
;
...
@@ -292,7 +292,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
...
@@ -292,7 +292,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
cs_change
=
1
;
cs_change
=
1
;
status
=
0
;
status
=
0
;
list_for_each_entry
(
t
,
&
m
->
transfers
,
transfer_list
)
{
list_for_each_entry
(
t
,
&
m
->
transfers
,
transfer_list
)
{
/* override speed or wordsize? */
/* override speed or wordsize? */
if
(
t
->
speed_hz
||
t
->
bits_per_word
)
if
(
t
->
speed_hz
||
t
->
bits_per_word
)
...
@@ -349,7 +349,8 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
...
@@ -349,7 +349,8 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
if
(
t
->
delay_usecs
)
if
(
t
->
delay_usecs
)
udelay
(
t
->
delay_usecs
);
udelay
(
t
->
delay_usecs
);
if
(
cs_change
&&
!
list_is_last
(
&
t
->
transfer_list
,
&
m
->
transfers
))
{
if
(
cs_change
&&
!
list_is_last
(
&
t
->
transfer_list
,
&
m
->
transfers
))
{
/* sometimes a short mid-message deselect of the chip
/* sometimes a short mid-message deselect of the chip
* may be needed to terminate a mode or command
* may be needed to terminate a mode or command
*/
*/
...
@@ -378,7 +379,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
...
@@ -378,7 +379,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
static
int
spi_bitbang_unprepare_hardware
(
struct
spi_master
*
spi
)
static
int
spi_bitbang_unprepare_hardware
(
struct
spi_master
*
spi
)
{
{
struct
spi_bitbang
*
bitbang
;
struct
spi_bitbang
*
bitbang
;
unsigned
long
flags
;
unsigned
long
flags
;
bitbang
=
spi_master_get_devdata
(
spi
);
bitbang
=
spi_master_get_devdata
(
spi
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录