ASoC: TWL4030: Add functionalty to reset the registers
Machine driver can instruct the codec driver to reset the
chip registers to their default values at probe time.
If machine driver does not provide setup data, then the
registers are going to be reseted to their defaults, to
be safe.
If the developer on the platform confirms that the register
reset is not needed, than it can be skipped, saving ~20ms
time in probe.
As safety measure do the register reset at remove time also.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
diff --git a/sound/soc/codecs/twl4030.h b/sound/soc/codecs/twl4030.h
index c22542c..788e3d1 100644
--- a/sound/soc/codecs/twl4030.h
+++ b/sound/soc/codecs/twl4030.h
@@ -44,6 +44,7 @@
unsigned int sysclk;
unsigned int offset_cncl_path;
unsigned int check_defaults:1;
+ unsigned int reset_registers:1;
unsigned int hs_extmute:1;
void (*set_hs_extmute)(int mute);
};