diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2021-06-15 15:28:29 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-15 17:39:41 +0200 |
commit | b90d9398d6ff6f518f352c39176450dbaf99e276 (patch) | |
tree | b59338e85b0b3dee50a3a90ba39df273c3f2ce4e /sound/soc/codecs/wcd938x-sdw.c | |
parent | ASoC: codecs: wcd938x: constify static struct snd_soc_dai_ops (diff) | |
download | linux-b90d9398d6ff6f518f352c39176450dbaf99e276.tar.xz linux-b90d9398d6ff6f518f352c39176450dbaf99e276.zip |
ASoC: codecs: wcd938x: remove incorrect module interdependency
For some reason we ended up with cyclic dependency between snd_soc_wcd938x
and snd_soc_wcd938x_sdw modules.
Remove this cyclic dependency by handling them in respective modules.
Without this below error is reported during make modules_install
depmod: ERROR: Cycle detected: snd_soc_wcd938x -> snd_soc_wcd938x_sdw -> snd_soc_wcd938x
depmod: ERROR: Found 2 modules in dependency cycles!
Fixes: 045442228868 ("ASoC: codecs: wcd938x: add audio routing and Kconfig")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210615132829.23067-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wcd938x-sdw.c')
-rw-r--r-- | sound/soc/codecs/wcd938x-sdw.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c index d82c40ec6898..d8d4caf48dc7 100644 --- a/sound/soc/codecs/wcd938x-sdw.c +++ b/sound/soc/codecs/wcd938x-sdw.c @@ -9,6 +9,7 @@ #include <linux/component.h> #include <sound/soc.h> #include <linux/pm_runtime.h> +#include <linux/irq.h> #include <linux/irqdomain.h> #include <linux/of.h> #include <linux/soundwire/sdw.h> @@ -176,8 +177,19 @@ static int wcd9380_interrupt_callback(struct sdw_slave *slave, struct sdw_slave_intr_status *status) { struct wcd938x_sdw_priv *wcd = dev_get_drvdata(&slave->dev); + struct irq_domain *slave_irq = wcd->slave_irq; + struct regmap *regmap = dev_get_regmap(&slave->dev, NULL); + u32 sts1, sts2, sts3; - return wcd938x_handle_sdw_irq(wcd); + do { + handle_nested_irq(irq_find_mapping(slave_irq, 0)); + regmap_read(regmap, WCD938X_DIGITAL_INTR_STATUS_0, &sts1); + regmap_read(regmap, WCD938X_DIGITAL_INTR_STATUS_1, &sts2); + regmap_read(regmap, WCD938X_DIGITAL_INTR_STATUS_2, &sts3); + + } while (sts1 || sts2 || sts3); + + return IRQ_HANDLED; } static struct sdw_slave_ops wcd9380_slave_ops = { @@ -239,16 +251,10 @@ static int wcd9380_probe(struct sdw_slave *pdev, SDW_SCP_INT1_PARITY; pdev->prop.lane_control_support = true; if (wcd->is_tx) { - struct regmap *rm; - pdev->prop.source_ports = GENMASK(WCD938X_MAX_SWR_PORTS, 0); pdev->prop.src_dpn_prop = wcd938x_dpn_prop; wcd->ch_info = &wcd938x_sdw_tx_ch_info[0]; pdev->prop.wake_capable = true; - - rm = devm_regmap_init_sdw(pdev, &wcd938x_regmap_config); - if (IS_ERR(rm)) - return PTR_ERR(rm); } else { pdev->prop.sink_ports = GENMASK(WCD938X_MAX_SWR_PORTS, 0); pdev->prop.sink_dpn_prop = wcd938x_dpn_prop; |