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
35bba23e
Commit
35bba23e
authored
Jan 30, 2023
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/for-6.2' into spi-6.2
parents
50028988
eede42c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
drivers/spi/spi-dw-core.c
drivers/spi/spi-dw-core.c
+1
-1
drivers/spi/spidev.c
drivers/spi/spidev.c
+16
-5
No files found.
drivers/spi/spi-dw-core.c
View file @
35bba23e
...
...
@@ -366,7 +366,7 @@ static void dw_spi_irq_setup(struct dw_spi *dws)
* will be adjusted at the final stage of the IRQ-based SPI transfer
* execution so not to lose the leftover of the incoming data.
*/
level
=
min_t
(
u
16
,
dws
->
fifo_len
/
2
,
dws
->
tx_len
);
level
=
min_t
(
u
nsigned
int
,
dws
->
fifo_len
/
2
,
dws
->
tx_len
);
dw_writel
(
dws
,
DW_SPI_TXFTLR
,
level
);
dw_writel
(
dws
,
DW_SPI_RXFTLR
,
level
-
1
);
...
...
drivers/spi/spidev.c
View file @
35bba23e
...
...
@@ -89,10 +89,22 @@ MODULE_PARM_DESC(bufsiz, "data bytes in biggest supported SPI message");
/*-------------------------------------------------------------------------*/
static
ssize_t
spidev_sync_unlocked
(
struct
spi_device
*
spi
,
struct
spi_message
*
message
)
{
ssize_t
status
;
status
=
spi_sync
(
spi
,
message
);
if
(
status
==
0
)
status
=
message
->
actual_length
;
return
status
;
}
static
ssize_t
spidev_sync
(
struct
spidev_data
*
spidev
,
struct
spi_message
*
message
)
{
in
t
status
;
ssize_
t
status
;
struct
spi_device
*
spi
;
mutex_lock
(
&
spidev
->
spi_lock
);
...
...
@@ -101,10 +113,9 @@ spidev_sync(struct spidev_data *spidev, struct spi_message *message)
if
(
spi
==
NULL
)
status
=
-
ESHUTDOWN
;
else
status
=
spi
_sync
(
spi
,
message
);
status
=
spi
dev_sync_unlocked
(
spi
,
message
);
if
(
status
==
0
)
status
=
message
->
actual_length
;
mutex_unlock
(
&
spidev
->
spi_lock
);
mutex_unlock
(
&
spidev
->
spi_lock
);
return
status
;
...
...
@@ -294,7 +305,7 @@ static int spidev_message(struct spidev_data *spidev,
spi_message_add_tail
(
k_tmp
,
&
msg
);
}
status
=
spidev_sync
(
spidev
,
&
msg
);
status
=
spidev_sync
_unlocked
(
spidev
->
spi
,
&
msg
);
if
(
status
<
0
)
goto
done
;
...
...
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