regmap: Use pad_bits and reg_bits when determining register format.
authorMarc Reilly <marc@cpdesign.com.au>
Fri, 16 Mar 2012 01:11:43 +0000 (12:11 +1100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 13 Apr 2012 10:29:14 +0000 (11:29 +0100)
commit55c1371c79713fb3795a04d369e46680be5ae2bf
tree9c530e61f0d91e38fa66960c12f1f092256db995
parent89a89b5e4fb23aa133e4aa9e0be97b43996d4ad2
regmap: Use pad_bits and reg_bits when determining register format.

This change combines any padding bits into the register address bits when
determining register format handlers to use the next byte-divisible
register size.
A reg_shift member is introduced to the regmap struct to enable fixup
of the reg format.
Format handlers now take an extra parameter specifying the number of
bits to shift the value by.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap.c