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
f54645d1
Commit
f54645d1
authored
Jun 02, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/dt' into spi-next
parents
15751f2e
cd6339e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
Documentation/devicetree/bindings/spi/spi-bus.txt
Documentation/devicetree/bindings/spi/spi-bus.txt
+2
-0
drivers/spi/spi.c
drivers/spi/spi.c
+2
-0
No files found.
Documentation/devicetree/bindings/spi/spi-bus.txt
View file @
f54645d1
...
@@ -55,6 +55,8 @@ contain the following properties.
...
@@ -55,6 +55,8 @@ contain the following properties.
chip select active high
chip select active high
- spi-3wire - (optional) Empty property indicating device requires
- spi-3wire - (optional) Empty property indicating device requires
3-wire mode.
3-wire mode.
- spi-lsb-first - (optional) Empty property indicating device requires
LSB first mode.
- spi-tx-bus-width - (optional) The bus width(number of data wires) that
- spi-tx-bus-width - (optional) The bus width(number of data wires) that
used for MOSI. Defaults to 1 if not present.
used for MOSI. Defaults to 1 if not present.
- spi-rx-bus-width - (optional) The bus width(number of data wires) that
- spi-rx-bus-width - (optional) The bus width(number of data wires) that
...
...
drivers/spi/spi.c
View file @
f54645d1
...
@@ -1255,6 +1255,8 @@ static void of_register_spi_devices(struct spi_master *master)
...
@@ -1255,6 +1255,8 @@ static void of_register_spi_devices(struct spi_master *master)
spi
->
mode
|=
SPI_CS_HIGH
;
spi
->
mode
|=
SPI_CS_HIGH
;
if
(
of_find_property
(
nc
,
"spi-3wire"
,
NULL
))
if
(
of_find_property
(
nc
,
"spi-3wire"
,
NULL
))
spi
->
mode
|=
SPI_3WIRE
;
spi
->
mode
|=
SPI_3WIRE
;
if
(
of_find_property
(
nc
,
"spi-lsb-first"
,
NULL
))
spi
->
mode
|=
SPI_LSB_FIRST
;
/* Device DUAL/QUAD mode */
/* Device DUAL/QUAD mode */
if
(
!
of_property_read_u32
(
nc
,
"spi-tx-bus-width"
,
&
value
))
{
if
(
!
of_property_read_u32
(
nc
,
"spi-tx-bus-width"
,
&
value
))
{
...
...
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