]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: Support bulk writes for devices without raw formatting
authorChen-Yu Tsai <wens@csie.org>
Mon, 20 Jun 2016 02:52:11 +0000 (10:52 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jun 2016 18:48:00 +0000 (19:48 +0100)
commitc50229128b3a04ece08e0d7363a90da1e0ce74bd
treeb14f98269f20a31edf901527e703007f284376c6
parenteafb69e30fd2c5eb541ab8464cb7c24186e23039
regmap: Support bulk writes for devices without raw formatting

When doing a bulk writes from a device which lacks raw I/O support we
fall back to doing register at a time reads but we still use the raw
formatters in order to render the data into the word size used by the
device (since bulk reads still operate on the device word size rather
than unsigned ints).  This means that devices without raw formatting
such as those that provide reg_read() are not supported.  Provide
handling for them by copying the values read into native endian values
of the appropriate size.

This complements commit 0f630dbe79de ("regmap: Support bulk reads for
devices without raw formatting").

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c