[alsa-devel] [PATCH 1/8] regmap: Add support for 24 bit wide register addresses

Lars-Peter Clausen lars at metafoo.de
Thu Jan 10 17:06:10 CET 2013


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 at metafoo.de>
---
 drivers/base/regmap/regmap.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 42d5cb0..26af93a 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:
-- 
1.8.0



More information about the Alsa-devel mailing list