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
52bc441a
Commit
52bc441a
authored
Jul 15, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/fix/setup' into spi-linus
parents
069e1572
103ccee4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
drivers/spi/spi-altera.c
drivers/spi/spi-altera.c
+12
-0
drivers/spi/spi-nuc900.c
drivers/spi/spi-nuc900.c
+13
-0
No files found.
drivers/spi/spi-altera.c
View file @
52bc441a
...
...
@@ -103,6 +103,16 @@ static void altera_spi_chipsel(struct spi_device *spi, int value)
}
}
static
int
altera_spi_setupxfer
(
struct
spi_device
*
spi
,
struct
spi_transfer
*
t
)
{
return
0
;
}
static
int
altera_spi_setup
(
struct
spi_device
*
spi
)
{
return
0
;
}
static
inline
unsigned
int
hw_txbyte
(
struct
altera_spi
*
hw
,
int
count
)
{
if
(
hw
->
tx
)
{
...
...
@@ -221,6 +231,7 @@ static int altera_spi_probe(struct platform_device *pdev)
master
->
bus_num
=
pdev
->
id
;
master
->
num_chipselect
=
16
;
master
->
mode_bits
=
SPI_CS_HIGH
;
master
->
setup
=
altera_spi_setup
;
hw
=
spi_master_get_devdata
(
master
);
platform_set_drvdata
(
pdev
,
hw
);
...
...
@@ -229,6 +240,7 @@ static int altera_spi_probe(struct platform_device *pdev)
hw
->
bitbang
.
master
=
spi_master_get
(
master
);
if
(
!
hw
->
bitbang
.
master
)
return
err
;
hw
->
bitbang
.
setup_transfer
=
altera_spi_setupxfer
;
hw
->
bitbang
.
chipselect
=
altera_spi_chipsel
;
hw
->
bitbang
.
txrx_bufs
=
altera_spi_txrx
;
...
...
drivers/spi/spi-nuc900.c
View file @
52bc441a
...
...
@@ -174,6 +174,17 @@ static void nuc900_spi_gobusy(struct nuc900_spi *hw)
spin_unlock_irqrestore
(
&
hw
->
lock
,
flags
);
}
static
int
nuc900_spi_setupxfer
(
struct
spi_device
*
spi
,
struct
spi_transfer
*
t
)
{
return
0
;
}
static
int
nuc900_spi_setup
(
struct
spi_device
*
spi
)
{
return
0
;
}
static
inline
unsigned
int
hw_txbyte
(
struct
nuc900_spi
*
hw
,
int
count
)
{
return
hw
->
tx
?
hw
->
tx
[
count
]
:
0
;
...
...
@@ -366,8 +377,10 @@ static int nuc900_spi_probe(struct platform_device *pdev)
master
->
num_chipselect
=
hw
->
pdata
->
num_cs
;
master
->
bus_num
=
hw
->
pdata
->
bus_num
;
hw
->
bitbang
.
master
=
hw
->
master
;
hw
->
bitbang
.
setup_transfer
=
nuc900_spi_setupxfer
;
hw
->
bitbang
.
chipselect
=
nuc900_spi_chipsel
;
hw
->
bitbang
.
txrx_bufs
=
nuc900_spi_txrx
;
hw
->
bitbang
.
master
->
setup
=
nuc900_spi_setup
;
hw
->
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
if
(
hw
->
res
==
NULL
)
{
...
...
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