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
Kirill Smelkov
linux
Commits
05232669
Commit
05232669
authored
Dec 12, 2016
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/core' into spi-next
parents
b14a8a80
8eee6b9d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
drivers/spi/spi.c
drivers/spi/spi.c
+7
-2
include/linux/spi/spi.h
include/linux/spi/spi.h
+1
-0
No files found.
drivers/spi/spi.c
View file @
05232669
...
...
@@ -697,10 +697,15 @@ static void spi_set_cs(struct spi_device *spi, bool enable)
if
(
spi
->
mode
&
SPI_CS_HIGH
)
enable
=
!
enable
;
if
(
gpio_is_valid
(
spi
->
cs_gpio
))
if
(
gpio_is_valid
(
spi
->
cs_gpio
))
{
gpio_set_value
(
spi
->
cs_gpio
,
!
enable
);
else
if
(
spi
->
master
->
set_cs
)
/* Some SPI masters need both GPIO CS & slave_select */
if
((
spi
->
master
->
flags
&
SPI_MASTER_GPIO_SS
)
&&
spi
->
master
->
set_cs
)
spi
->
master
->
set_cs
(
spi
,
!
enable
);
}
else
if
(
spi
->
master
->
set_cs
)
{
spi
->
master
->
set_cs
(
spi
,
!
enable
);
}
}
#ifdef CONFIG_HAS_DMA
...
...
include/linux/spi/spi.h
View file @
05232669
...
...
@@ -442,6 +442,7 @@ struct spi_master {
#define SPI_MASTER_NO_TX BIT(2)
/* can't do buffer write */
#define SPI_MASTER_MUST_RX BIT(3)
/* requires rx */
#define SPI_MASTER_MUST_TX BIT(4)
/* requires tx */
#define SPI_MASTER_GPIO_SS BIT(5)
/* GPIO CS must select slave */
/*
* on some hardware transfer / message size may be constrained
...
...
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