diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-01-10 17:06:10 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-12 00:07:26 +0000 |
commit | 237019e7e356abb1bad591fa5edab68224793143 (patch) | |
tree | 1c02e806d8155a48783330a5e80350a0fbb2f2d6 /drivers/base/regmap/regmap.c | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) |
regmap: Add support for 24 bit wide register addresses
Since regmap already has support for formatting 24 bit wide values, so adding
support for 24 bit wide registers is pretty much straight forward.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regmap.c')
-rw-r--r-- | drivers/base/regmap/regmap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 42d5cb0f503f..26af93a2595d 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -500,6 +500,12 @@ struct regmap *regmap_init(struct device *dev, } break; + case 24: + if (reg_endian != REGMAP_ENDIAN_BIG) + goto err_map; + map->format.format_reg = regmap_format_24; + break; + case 32: switch (reg_endian) { case REGMAP_ENDIAN_BIG: |