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
ffd6dd3e
Commit
ffd6dd3e
authored
Oct 25, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/hspi' into spi-next
parents
6e693ff1
e5f7825c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
Documentation/devicetree/bindings/spi/sh-hspi.txt
Documentation/devicetree/bindings/spi/sh-hspi.txt
+7
-0
drivers/spi/spi-sh-hspi.c
drivers/spi/spi-sh-hspi.c
+9
-1
No files found.
Documentation/devicetree/bindings/spi/sh-hspi.txt
0 → 100644
View file @
ffd6dd3e
Renesas HSPI.
Required properties:
- compatible : "renesas,hspi"
- reg : Offset and length of the register set for the device
- interrupts : interrupt line used by HSPI
drivers/spi/spi-sh-hspi.c
View file @
ffd6dd3e
...
...
@@ -137,7 +137,7 @@ static void hspi_hw_setup(struct hspi_priv *hspi,
rate
/=
16
;
/* CLKCx calculation */
rate
/=
(((
idiv_clk
&
0x1F
)
+
1
)
*
2
)
;
rate
/=
(((
idiv_clk
&
0x1F
)
+
1
)
*
2
);
/* save best settings */
tmp
=
abs
(
target_rate
-
rate
);
...
...
@@ -303,6 +303,7 @@ static int hspi_probe(struct platform_device *pdev)
master
->
setup
=
hspi_setup
;
master
->
cleanup
=
hspi_cleanup
;
master
->
mode_bits
=
SPI_CPOL
|
SPI_CPHA
;
master
->
dev
.
of_node
=
pdev
->
dev
.
of_node
;
master
->
auto_runtime_pm
=
true
;
master
->
transfer_one_message
=
hspi_transfer_one_message
;
ret
=
devm_spi_register_master
(
&
pdev
->
dev
,
master
);
...
...
@@ -332,12 +333,19 @@ static int hspi_remove(struct platform_device *pdev)
return
0
;
}
static
struct
of_device_id
hspi_of_match
[]
=
{
{
.
compatible
=
"renesas,hspi"
,
},
{
/* sentinel */
}
};
MODULE_DEVICE_TABLE
(
of
,
hspi_of_match
);
static
struct
platform_driver
hspi_driver
=
{
.
probe
=
hspi_probe
,
.
remove
=
hspi_remove
,
.
driver
=
{
.
name
=
"sh-hspi"
,
.
owner
=
THIS_MODULE
,
.
of_match_table
=
hspi_of_match
,
},
};
module_platform_driver
(
hspi_driver
);
...
...
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