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
c25b2c9e
Commit
c25b2c9e
authored
Oct 25, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/imx' into spi-next
parents
ffd6dd3e
9e556dcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
drivers/spi/spi-imx.c
drivers/spi/spi-imx.c
+33
-0
No files found.
drivers/spi/spi-imx.c
View file @
c25b2c9e
...
...
@@ -749,6 +749,35 @@ static void spi_imx_cleanup(struct spi_device *spi)
{
}
static
int
spi_imx_prepare_message
(
struct
spi_master
*
master
,
struct
spi_message
*
msg
)
{
struct
spi_imx_data
*
spi_imx
=
spi_master_get_devdata
(
master
);
int
ret
;
ret
=
clk_enable
(
spi_imx
->
clk_per
);
if
(
ret
)
return
ret
;
ret
=
clk_enable
(
spi_imx
->
clk_ipg
);
if
(
ret
)
{
clk_disable
(
spi_imx
->
clk_per
);
return
ret
;
}
return
0
;
}
static
int
spi_imx_unprepare_message
(
struct
spi_master
*
master
,
struct
spi_message
*
msg
)
{
struct
spi_imx_data
*
spi_imx
=
spi_master_get_devdata
(
master
);
clk_disable
(
spi_imx
->
clk_ipg
);
clk_disable
(
spi_imx
->
clk_per
);
return
0
;
}
static
int
spi_imx_probe
(
struct
platform_device
*
pdev
)
{
struct
device_node
*
np
=
pdev
->
dev
.
of_node
;
...
...
@@ -810,6 +839,8 @@ static int spi_imx_probe(struct platform_device *pdev)
spi_imx
->
bitbang
.
txrx_bufs
=
spi_imx_transfer
;
spi_imx
->
bitbang
.
master
->
setup
=
spi_imx_setup
;
spi_imx
->
bitbang
.
master
->
cleanup
=
spi_imx_cleanup
;
spi_imx
->
bitbang
.
master
->
prepare_message
=
spi_imx_prepare_message
;
spi_imx
->
bitbang
.
master
->
unprepare_message
=
spi_imx_unprepare_message
;
spi_imx
->
bitbang
.
master
->
mode_bits
=
SPI_CPOL
|
SPI_CPHA
|
SPI_CS_HIGH
;
init_completion
(
&
spi_imx
->
xfer_done
);
...
...
@@ -872,6 +903,8 @@ static int spi_imx_probe(struct platform_device *pdev)
dev_info
(
&
pdev
->
dev
,
"probed
\n
"
);
clk_disable
(
spi_imx
->
clk_ipg
);
clk_disable
(
spi_imx
->
clk_per
);
return
ret
;
out_clk_put:
...
...
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