summaryrefslogtreecommitdiff
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-18 14:52:25 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-20 16:15:39 +0400
commit82159ba8e6ef8c38e3e0452d90b4ff8da9e4b2c1 (patch)
tree2f488ebc125b24d6790afad633ec8be1e933be18 /include/linux/regmap.h
parentdcd6c92267155e70a94b3927bce681ce74b80d1f (diff)
downloadlinux-82159ba8e6ef8c38e3e0452d90b4ff8da9e4b2c1.tar.xz
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>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index eb93921cdd30..a6ed6e6e27ac 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);