Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
dd8c26f0
Commit
dd8c26f0
authored
Oct 25, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/bitbang' into spi-next
parents
52d85ebb
cff93c58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
drivers/spi/spi-bitbang.c
drivers/spi/spi-bitbang.c
+7
-6
No files found.
drivers/spi/spi-bitbang.c
View file @
dd8c26f0
...
...
@@ -191,7 +191,7 @@ int spi_bitbang_setup(struct spi_device *spi)
bitbang
=
spi_master_get_devdata
(
spi
->
master
);
if
(
!
cs
)
{
cs
=
kzalloc
(
sizeof
*
cs
,
GFP_KERNEL
);
cs
=
kzalloc
(
sizeof
(
*
cs
)
,
GFP_KERNEL
);
if
(
!
cs
)
return
-
ENOMEM
;
spi
->
controller_state
=
cs
;
...
...
@@ -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
)
{
struct
spi_bitbang
*
bitbang
;
struct
spi_bitbang
*
bitbang
;
unsigned
long
flags
;
bitbang
=
spi_master_get_devdata
(
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
,
struct
spi_message
*
m
)
{
struct
spi_bitbang
*
bitbang
;
struct
spi_bitbang
*
bitbang
;
unsigned
nsecs
;
struct
spi_transfer
*
t
=
NULL
;
unsigned
cs_change
;
...
...
@@ -292,7 +292,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
cs_change
=
1
;
status
=
0
;
list_for_each_entry
(
t
,
&
m
->
transfers
,
transfer_list
)
{
list_for_each_entry
(
t
,
&
m
->
transfers
,
transfer_list
)
{
/* override speed or wordsize? */
if
(
t
->
speed_hz
||
t
->
bits_per_word
)
...
...
@@ -349,7 +349,8 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
if
(
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
* may be needed to terminate a mode or command
*/
...
...
@@ -378,7 +379,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
static
int
spi_bitbang_unprepare_hardware
(
struct
spi_master
*
spi
)
{
struct
spi_bitbang
*
bitbang
;
struct
spi_bitbang
*
bitbang
;
unsigned
long
flags
;
bitbang
=
spi_master_get_devdata
(
spi
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment