regmap: Add support for 24 bit wide register addresses
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 10 Jan 2013 16:06:10 +0000 (17:06 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 12 Jan 2013 00:07:26 +0000 (00:07 +0000)
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>
drivers/base/regmap/regmap.c

index 42d5cb0f503fb825104d7a0f02f79b63ab6f63da..26af93a2595d214c8f3e82def3093fa5d2b5f406 100644 (file)
@@ -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: