aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/cs42l42.h
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2022-09-15 11:44:40 +0200
committerMark Brown <broonie@kernel.org>2022-09-19 18:05:33 +0100
commitae9f5e607da47104bc3d02e5c0ed237749f5db51 (patch)
tree606cdcee3b4913831526c0c369f0e3d43541212d /sound/soc/codecs/cs42l42.h
parentASoC: cs42l42: Pass component and dai defs into common probe (diff)
downloadwireguard-linux-ae9f5e607da47104bc3d02e5c0ed237749f5db51.tar.xz
wireguard-linux-ae9f5e607da47104bc3d02e5c0ed237749f5db51.zip
ASoC: cs42l42: Split I2C identity into separate module
Split the I2C bus driver definition and probe()/remove() into a separate module so that a SoundWire build of CS42L42 support does not have a spurious dependency on I2C. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Martin PoviĊĦer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220915094444.11434-8-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs42l42.h')
-rw-r--r--sound/soc/codecs/cs42l42.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs42l42.h b/sound/soc/codecs/cs42l42.h
index a8e0d5b414a5..2a9f178f6190 100644
--- a/sound/soc/codecs/cs42l42.h
+++ b/sound/soc/codecs/cs42l42.h
@@ -20,6 +20,8 @@
#include <linux/regulator/consumer.h>
#include <sound/jack.h>
#include <sound/cs42l42.h>
+#include <sound/soc-component.h>
+#include <sound/soc-dai.h>
struct cs42l42_private {
struct regmap *regmap;
@@ -50,4 +52,17 @@ struct cs42l42_private {
bool init_done;
};
+extern const struct regmap_config cs42l42_regmap;
+extern const struct snd_soc_component_driver cs42l42_soc_component;
+extern struct snd_soc_dai_driver cs42l42_dai;
+
+int cs42l42_suspend(struct device *dev);
+int cs42l42_resume(struct device *dev);
+void cs42l42_resume_restore(struct device *dev);
+int cs42l42_common_probe(struct cs42l42_private *cs42l42,
+ const struct snd_soc_component_driver *component_drv,
+ struct snd_soc_dai_driver *dai);
+int cs42l42_init(struct cs42l42_private *cs42l42);
+void cs42l42_common_remove(struct cs42l42_private *cs42l42);
+
#endif /* __CS42L42_H__ */