Commit cd1b9dd0 authored by Mark Brown's avatar Mark Brown

regmap: spi: Handle async writes of only one buffer

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: default avatarMark Brown <broonie@linaro.org>
parent 7ccda983
...@@ -73,7 +73,8 @@ static int regmap_spi_async_write(void *context, ...@@ -73,7 +73,8 @@ static int regmap_spi_async_write(void *context,
spi_message_init(&async->m); spi_message_init(&async->m);
spi_message_add_tail(&async->t[0], &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.complete = regmap_spi_complete;
async->m.context = async; async->m.context = async;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment