mfd: Initialise WM8994 register cache after reading chip ID registers
The different devices handled by the WM8994 can be distinguished using
their ID registers so we don't need to rely on the user having registered
the device correctly. Instead do the initial regmap setup with a minimal
configuration only supporting physical I/O and then configure the cache
once we have identified the device.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c
index d98a70e..03594c2 100644
--- a/drivers/mfd/wm8994-regmap.c
+++ b/drivers/mfd/wm8994-regmap.c
@@ -1216,3 +1216,8 @@
.volatile_reg = wm8958_volatile_register,
.readable_reg = wm8958_readable_register,
};
+
+struct regmap_config wm8994_base_regmap_config = {
+ .reg_bits = 16,
+ .val_bits = 16,
+};