diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-18 10:52:25 +0000 |
---|---|---|
committer | Lokesh Pathak <lpathak@nvidia.com> | 2012-03-05 07:56:32 -0800 |
commit | fa17671aae4c6891ad008c0f4cb8ad2b21b41858 (patch) | |
tree | 2de3cf15f343c7663be5bfa9fb27aebb06c3e5e6 /include/linux | |
parent | 5cbf2fb24232034d211dbcd1c6719bea3930d38f (diff) |
regmap: Add support for padding between register and address
Some devices, especially those with high speed control interfaces, require
padding between the register and the data. Support this in the regmap API
by providing a pad_bits configuration parameter.
Only devices with integer byte counts are supported.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 82159ba8e6ef8c38e3e0452d90b4ff8da9e4b2c1)
Change-Id: Id9710b92e08ac905f3291715aa457842e60fed3d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87575
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/regmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 534e07d0f317..9679f357f6b6 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -44,6 +44,7 @@ struct reg_default { * Configuration for the register map of a device. * * @reg_bits: Number of bits in a register address, mandatory. + * @pad_bits: Number of bits of padding between register and value. * @val_bits: Number of bits in a register value, mandatory. * * @writeable_reg: Optional callback returning true if the register @@ -74,6 +75,7 @@ struct reg_default { */ struct regmap_config { int reg_bits; + int pad_bits; int val_bits; bool (*writeable_reg)(struct device *dev, unsigned int reg); |