projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ccda98
)
regmap: spi: Handle async writes of only one buffer
author
Mark Brown
<broonie@linaro.org>
Thu, 10 Oct 2013 21:25:23 +0000
(22:25 +0100)
committer
Mark Brown
<broonie@linaro.org>
Mon, 14 Oct 2013 21:09:26 +0000
(22:09 +0100)
If the value is zero then assume it has been included in the register data
and don't send anything, minimising the number of interactions with the
hardware.
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regmap-spi.c
patch
|
blob
|
history
diff --git
a/drivers/base/regmap/regmap-spi.c
b/drivers/base/regmap/regmap-spi.c
index 4c506bd940f372b8bbe3b630a9599ca52ea745bf..37f12ae7aadaeadc60005b2bced37ac05bc7210d 100644
(file)
--- a/
drivers/base/regmap/regmap-spi.c
+++ b/
drivers/base/regmap/regmap-spi.c
@@
-73,7
+73,8
@@
static int regmap_spi_async_write(void *context,
spi_message_init(&async->m);
spi_message_add_tail(&async->t[0], &async->m);
- spi_message_add_tail(&async->t[1], &async->m);
+ if (val)
+ spi_message_add_tail(&async->t[1], &async->m);
async->m.complete = regmap_spi_complete;
async->m.context = async;