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
f0a2a049
Commit
f0a2a049
authored
Nov 04, 2015
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/davinci' into spi-next
parents
3e7018de
8cae0424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
drivers/spi/spi-davinci.c
drivers/spi/spi-davinci.c
+4
-11
No files found.
drivers/spi/spi-davinci.c
View file @
f0a2a049
...
...
@@ -215,18 +215,10 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
struct
davinci_spi_config
*
spicfg
=
spi
->
controller_data
;
u8
chip_sel
=
spi
->
chip_select
;
u16
spidat1
=
CS_DEFAULT
;
bool
gpio_chipsel
=
false
;
int
gpio
;
dspi
=
spi_master_get_devdata
(
spi
->
master
);
pdata
=
&
dspi
->
pdata
;
if
(
spi
->
cs_gpio
>=
0
)
{
/* SPI core parse and update master->cs_gpio */
gpio_chipsel
=
true
;
gpio
=
spi
->
cs_gpio
;
}
/* program delay transfers if tx_delay is non zero */
if
(
spicfg
->
wdelay
)
spidat1
|=
SPIDAT1_WDEL
;
...
...
@@ -235,11 +227,12 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
* Board specific chip select logic decides the polarity and cs
* line for the controller
*/
if
(
gpio_chipsel
)
{
if
(
spi
->
cs_gpio
>=
0
)
{
if
(
value
==
BITBANG_CS_ACTIVE
)
gpio_set_value
(
gpio
,
spi
->
mode
&
SPI_CS_HIGH
);
gpio_set_value
(
spi
->
cs_
gpio
,
spi
->
mode
&
SPI_CS_HIGH
);
else
gpio_set_value
(
gpio
,
!
(
spi
->
mode
&
SPI_CS_HIGH
));
gpio_set_value
(
spi
->
cs_gpio
,
!
(
spi
->
mode
&
SPI_CS_HIGH
));
}
else
{
if
(
value
==
BITBANG_CS_ACTIVE
)
{
spidat1
|=
SPIDAT1_CSHOLD_MASK
;
...
...
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