regmap: Fix regmap_bulk_write for bus writes
authorMarkus Pargmann <mpa@pengutronix.de>
Fri, 21 Aug 2015 08:26:41 +0000 (10:26 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 21 Aug 2015 16:32:54 +0000 (09:32 -0700)
commitc594b7f21d7d02115e828db46fddbba1da7ed1b8
tree740cf7fcf625474232fb88cae236f292dac6f31f
parentfa3eec7791b0fe27e3112804a71ba445ff336a6b
regmap: Fix regmap_bulk_write for bus writes

The regmap config does not prohibit val_bytes that are not powers of
two. But the current code of regmap_bulk_write for use_single_rw does
limit the possible val_bytes to 1, 2 and 4.

This patch fixes the behaviour to allow bus writes with non-standard
val_bytes sizes.

Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c