From 1622b6d883522aaa83acddc0a8d3d24b721f84f3 Mon Sep 17 00:00:00 2001 From: Soumya Managoli Date: Tue, 13 Dec 2022 10:01:17 +0530 Subject: [PATCH] ASoC: codecs: Allow register write via debugfs Add support for QTI regmap debugfs register write access on wcd937x codec. Change-Id: I04e3d98ec308c5cbf9f140c6fcfb1ab5fbe5fd50 Signed-off-by: Soumya Managoli --- asoc/codecs/wcd937x/wcd937x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/asoc/codecs/wcd937x/wcd937x.c b/asoc/codecs/wcd937x/wcd937x.c index 8fff2dc063..9f86796e0c 100644 --- a/asoc/codecs/wcd937x/wcd937x.c +++ b/asoc/codecs/wcd937x/wcd937x.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -27,6 +27,7 @@ #include "wcd937x.h" #include "internal.h" #include "asoc/bolero-slave-internal.h" +#include #define WCD9370_VARIANT 0 #define WCD9375_VARIANT 5 @@ -2839,6 +2840,9 @@ static int wcd937x_soc_codec_probe(struct snd_soc_component *component) wcd937x->component = component; snd_soc_component_init_regmap(component, wcd937x->regmap); + + devm_regmap_qti_debugfs_register(&wcd937x->tx_swr_dev->dev, wcd937x->regmap); + variant = (snd_soc_component_read( component, WCD937X_DIGITAL_EFUSE_REG_0) & 0x1E) >> 1; wcd937x->variant = variant;