aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regmap.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-01-10 11:06:10 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-11 19:07:26 -0500
commit237019e7e356abb1bad591fa5edab68224793143 (patch)
tree1c02e806d8155a48783330a5e80350a0fbb2f2d6 /drivers/base/regmap/regmap.c
parent9931faca02c604c22335f5a935a501bb2ace6e20 (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.c6
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,
500 } 500 }
501 break; 501 break;
502 502
503 case 24:
504 if (reg_endian != REGMAP_ENDIAN_BIG)
505 goto err_map;
506 map->format.format_reg = regmap_format_24;
507 break;
508
503 case 32: 509 case 32:
504 switch (reg_endian) { 510 switch (reg_endian) {
505 case REGMAP_ENDIAN_BIG: 511 case REGMAP_ENDIAN_BIG: