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
170c2d0a
Commit
170c2d0a
authored
Nov 14, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spi-mcspi' into spi-next
parents
8266bdd2
2cd45179
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Documentation/devicetree/bindings/spi/omap-spi.txt
Documentation/devicetree/bindings/spi/omap-spi.txt
+3
-3
drivers/spi/spi-omap2-mcspi.c
drivers/spi/spi-omap2-mcspi.c
+3
-3
include/linux/platform_data/spi-omap2-mcspi.h
include/linux/platform_data/spi-omap2-mcspi.h
+2
-2
No files found.
Documentation/devicetree/bindings/spi/omap-spi.txt
View file @
170c2d0a
...
...
@@ -6,9 +6,9 @@ Required properties:
- "ti,omap4-spi" for OMAP4+.
- ti,spi-num-cs : Number of chipselect supported by the instance.
- ti,hwmods: Name of the hwmod associated to the McSPI
- ti,pindir-d0-
in-d1-out: Select the D0 pin as in
put and D1 as
output. The default is D0 as out
put and
D1 as
in
put.
- ti,pindir-d0-
out-d1-in: Select the D0 pin as out
put and D1 as
input. The default is D0 as in
put and
D1 as
out
put.
Example:
...
...
drivers/spi/spi-omap2-mcspi.c
View file @
170c2d0a
...
...
@@ -765,7 +765,7 @@ static int omap2_mcspi_setup_transfer(struct spi_device *spi,
/* standard 4-wire master mode: SCK, MOSI/out, MISO/in, nCS
* REVISIT: this controller could support SPI_3WIRE mode.
*/
if
(
mcspi
->
pin_dir
==
MCSPI_PINDIR_D0_
OUT_D1_IN
)
{
if
(
mcspi
->
pin_dir
==
MCSPI_PINDIR_D0_
IN_D1_OUT
)
{
l
&=
~
OMAP2_MCSPI_CHCONF_IS
;
l
&=
~
OMAP2_MCSPI_CHCONF_DPE1
;
l
|=
OMAP2_MCSPI_CHCONF_DPE0
;
...
...
@@ -1187,8 +1187,8 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
of_property_read_u32
(
node
,
"ti,spi-num-cs"
,
&
num_cs
);
master
->
num_chipselect
=
num_cs
;
master
->
bus_num
=
bus_num
++
;
if
(
of_get_property
(
node
,
"ti,pindir-d0-
in-d1-out
"
,
NULL
))
mcspi
->
pin_dir
=
MCSPI_PINDIR_D0_
IN_D1_OUT
;
if
(
of_get_property
(
node
,
"ti,pindir-d0-
out-d1-in
"
,
NULL
))
mcspi
->
pin_dir
=
MCSPI_PINDIR_D0_
OUT_D1_IN
;
}
else
{
pdata
=
pdev
->
dev
.
platform_data
;
master
->
num_chipselect
=
pdata
->
num_cs
;
...
...
include/linux/platform_data/spi-omap2-mcspi.h
View file @
170c2d0a
...
...
@@ -7,8 +7,8 @@
#define OMAP4_MCSPI_REG_OFFSET 0x100
#define MCSPI_PINDIR_D0_
OUT_D1_IN
0
#define MCSPI_PINDIR_D0_
IN_D1_OUT
1
#define MCSPI_PINDIR_D0_
IN_D1_OUT
0
#define MCSPI_PINDIR_D0_
OUT_D1_IN
1
struct
omap2_mcspi_platform_config
{
unsigned
short
num_cs
;
...
...
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