asoc: lpass-cdc: allow register write via debugfs

allow QTI regmap debugfs register writes for debugging purpose
on lpass-cdc, wsa and wcd codecs.

Change-Id: Icdedb8f0a5e198bbb6afecb4b6995cc0d1a35833
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
This commit is contained in:
Junkai Cai
2021-02-24 17:05:27 -08:00
parent ba39b85277
commit fbfd93a2dc
3 changed files with 10 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include "lpass-cdc.h" #include "lpass-cdc.h"
#include "internal.h" #include "internal.h"
#include "lpass-cdc-clk-rsc.h" #include "lpass-cdc-clk-rsc.h"
#include <linux/qti-regmap-debugfs.h>
#define DRV_NAME "lpass-cdc" #define DRV_NAME "lpass-cdc"
@@ -1283,6 +1284,9 @@ static int lpass_cdc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "%s:regmap init failed\n", __func__); dev_err(&pdev->dev, "%s:regmap init failed\n", __func__);
return -EINVAL; return -EINVAL;
} }
devm_regmap_qti_debugfs_register(priv->dev, priv->regmap);
priv->read_dev = __lpass_cdc_reg_read; priv->read_dev = __lpass_cdc_reg_read;
priv->write_dev = __lpass_cdc_reg_write; priv->write_dev = __lpass_cdc_reg_write;

View File

@@ -20,6 +20,7 @@
#include <asoc/msm-cdc-pinctrl.h> #include <asoc/msm-cdc-pinctrl.h>
#include <asoc/msm-cdc-supply.h> #include <asoc/msm-cdc-supply.h>
#include <dt-bindings/sound/audio-codec-port-types.h> #include <dt-bindings/sound/audio-codec-port-types.h>
#include <linux/qti-regmap-debugfs.h>
#include "wcd938x-registers.h" #include "wcd938x-registers.h"
#include "wcd938x.h" #include "wcd938x.h"
@@ -3954,6 +3955,8 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
wcd938x->component = component; wcd938x->component = component;
snd_soc_component_init_regmap(component, wcd938x->regmap); snd_soc_component_init_regmap(component, wcd938x->regmap);
devm_regmap_qti_debugfs_register(&wcd938x->tx_swr_dev->dev, wcd938x->regmap);
variant = (snd_soc_component_read(component, variant = (snd_soc_component_read(component,
WCD938X_DIGITAL_EFUSE_REG_0) & 0x1E) >> 1; WCD938X_DIGITAL_EFUSE_REG_0) & 0x1E) >> 1;
wcd938x->variant = variant; wcd938x->variant = variant;

View File

@@ -30,6 +30,7 @@
#include "wsa883x.h" #include "wsa883x.h"
#include "internal.h" #include "internal.h"
#include "asoc/bolero-slave-internal.h" #include "asoc/bolero-slave-internal.h"
#include <linux/qti-regmap-debugfs.h>
#define T1_TEMP -10 #define T1_TEMP -10
#define T2_TEMP 150 #define T2_TEMP 150
@@ -1638,6 +1639,8 @@ static int wsa883x_swr_probe(struct swr_device *pdev)
goto dev_err; goto dev_err;
} }
devm_regmap_qti_debugfs_register(&pdev->dev, wsa883x->regmap);
/* Set all interrupts as edge triggered */ /* Set all interrupts as edge triggered */
for (i = 0; i < wsa883x_regmap_irq_chip.num_regs; i++) for (i = 0; i < wsa883x_regmap_irq_chip.num_regs; i++)
regmap_write(wsa883x->regmap, (WSA883X_INTR_LEVEL0 + i), 0); regmap_write(wsa883x->regmap, (WSA883X_INTR_LEVEL0 + i), 0);