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
3086c9f6
Commit
3086c9f6
authored
May 06, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spi/merge' of
git://git.secretlab.ca/git/linux
into spi-fix-grant
parents
c1be5a5b
0d2d0cc5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
drivers/spi/spi-atmel.c
drivers/spi/spi-atmel.c
+2
-2
drivers/spi/spi-davinci.c
drivers/spi/spi-davinci.c
+1
-1
drivers/spi/spi.c
drivers/spi/spi.c
+6
-3
include/linux/spi/spi.h
include/linux/spi/spi.h
+2
-2
No files found.
drivers/spi/spi-atmel.c
View file @
3086c9f6
...
...
@@ -847,8 +847,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
}
/* FIXME implement these protocol options!! */
if
(
xfer
->
speed_hz
)
{
dev_dbg
(
&
spi
->
dev
,
"
no protocol options yet
\n
"
);
if
(
xfer
->
speed_hz
<
spi
->
max_speed_hz
)
{
dev_dbg
(
&
spi
->
dev
,
"
can't change speed in transfer
\n
"
);
return
-
ENOPROTOOPT
;
}
...
...
drivers/spi/spi-davinci.c
View file @
3086c9f6
...
...
@@ -784,7 +784,7 @@ static const struct of_device_id davinci_spi_of_match[] = {
},
{
},
};
MODULE_DEVICE_TABLE
(
of
,
davini_spi_of_match
);
MODULE_DEVICE_TABLE
(
of
,
davin
c
i_spi_of_match
);
/**
* spi_davinci_get_pdata - Get platform data from DTS binding
...
...
drivers/spi/spi.c
View file @
3086c9f6
...
...
@@ -334,7 +334,7 @@ struct spi_device *spi_alloc_device(struct spi_master *master)
spi
->
dev
.
parent
=
&
master
->
dev
;
spi
->
dev
.
bus
=
&
spi_bus_type
;
spi
->
dev
.
release
=
spidev_release
;
spi
->
cs_gpio
=
-
E
INVAL
;
spi
->
cs_gpio
=
-
E
NOENT
;
device_initialize
(
&
spi
->
dev
);
return
spi
;
}
...
...
@@ -1067,8 +1067,11 @@ static int of_spi_register_master(struct spi_master *master)
nb
=
of_gpio_named_count
(
np
,
"cs-gpios"
);
master
->
num_chipselect
=
max
(
nb
,
(
int
)
master
->
num_chipselect
);
if
(
nb
<
1
)
/* Return error only for an incorrectly formed cs-gpios property */
if
(
nb
==
0
||
nb
==
-
ENOENT
)
return
0
;
else
if
(
nb
<
0
)
return
nb
;
cs
=
devm_kzalloc
(
&
master
->
dev
,
sizeof
(
int
)
*
master
->
num_chipselect
,
...
...
@@ -1079,7 +1082,7 @@ static int of_spi_register_master(struct spi_master *master)
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
master
->
num_chipselect
;
i
++
)
cs
[
i
]
=
-
E
INVAL
;
cs
[
i
]
=
-
E
NOENT
;
for
(
i
=
0
;
i
<
nb
;
i
++
)
cs
[
i
]
=
of_get_named_gpio
(
np
,
"cs-gpios"
,
i
);
...
...
include/linux/spi/spi.h
View file @
3086c9f6
...
...
@@ -57,7 +57,7 @@ extern struct bus_type spi_bus_type;
* @modalias: Name of the driver to use with this device, or an alias
* for that name. This appears in the sysfs "modalias" attribute
* for driver coldplugging, and in uevents used for hotplugging
* @cs_gpio: gpio number of the chipselect line (optional, -E
INVAL
when
* @cs_gpio: gpio number of the chipselect line (optional, -E
NOENT
when
* when not using a GPIO line)
*
* A @spi_device is used to interchange data between an SPI slave
...
...
@@ -261,7 +261,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
* queue so the subsystem notifies the driver that it may relax the
* hardware by issuing this call
* @cs_gpios: Array of GPIOs to use as chip select lines; one per CS
* number. Any individual value may be -E
INVAL
for CS lines that
* number. Any individual value may be -E
NOENT
for CS lines that
* are not GPIOs (driven by the SPI controller itself).
*
* Each SPI master controller can communicate with one or more @spi_device
...
...
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