From: kovalev@altlinux.org
To: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
u.kleine-koenig@pengutronix.de, a.firago@yadro.com,
sashal@kernel.org, zhuning0077@gmail.com, tiwai@suse.com,
perex@perex.cz, broonie@kernel.org, lgirdwood@gmail.com,
kovalev@altlinux.org
Subject: [PATCH 6.1.y 4/7] ASoC: codecs: ES8326: Change Volatile Reg function
Date: Tue, 30 Jan 2024 12:47:05 +0300 [thread overview]
Message-ID: <20240130094708.290485-5-kovalev@altlinux.org> (raw)
In-Reply-To: <20240130094708.290485-1-kovalev@altlinux.org>
From: Zhu Ning <zhuning0077@gmail.com>
Commit f1230a27c14b4d05e1d6af02be55c617b53728a4 upstream.
The new calibration and headphone detection function
require reading new volatile registers. Add them in
the volatile register function.
Signed-off-by: Zhu Ning <zhuning0077@gmail.com>
Link: https://lore.kernel.org/r/20230717033223.42506-2-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
---
sound/soc/codecs/es8326.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index e953c0157ba03f..7cfe535e0b6da4 100644
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -158,20 +158,25 @@ static const struct snd_soc_dapm_route es8326_dapm_routes[] = {
{"HPOR", NULL, "RHPMIX"},
};
-static const struct regmap_range es8326_volatile_ranges[] = {
- regmap_reg_range(ES8326_HPDET_STA, ES8326_HPDET_STA),
-};
-
-static const struct regmap_access_table es8326_volatile_table = {
- .yes_ranges = es8326_volatile_ranges,
- .n_yes_ranges = ARRAY_SIZE(es8326_volatile_ranges),
-};
+static bool es8326_volatile_register(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case ES8326_HPL_OFFSET_INI:
+ case ES8326_HPR_OFFSET_INI:
+ case ES8326_HPDET_STA:
+ case ES8326_CTIA_OMTP_STA:
+ case ES8326_CSM_MUTE_STA:
+ return true;
+ default:
+ return false;
+ }
+}
static const struct regmap_config es8326_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0xff,
- .volatile_table = &es8326_volatile_table,
+ .volatile_reg = es8326_volatile_register,
.cache_type = REGCACHE_RBTREE,
};
--
2.33.8
next prev parent reply other threads:[~2024-01-30 9:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 9:47 [PATCH 6.1.y 0/7] ASoC: codecs: es8326: fix support kovalev
2024-01-30 9:47 ` [PATCH 6.1.y 1/7] ASoC: codecs: es8326: Convert to i2c's .probe_new() kovalev
2024-01-30 11:13 ` Mark Brown
2024-01-30 9:47 ` [PATCH 6.1.y 2/7] ASoC: codecs: ES8326: Add es8326_mute function kovalev
2024-01-30 9:47 ` [PATCH 6.1.y 3/7] ASoC: codecs: ES8326: Change Hp_detect register names kovalev
2024-01-30 9:47 ` kovalev [this message]
2024-01-30 9:47 ` [PATCH 6.1.y 5/7] ASoC: codecs: ES8326: Fix power-up sequence kovalev
2024-01-30 9:47 ` [PATCH 6.1.y 6/7] ASOC: codecs: ES8326: Add calibration support for version_b kovalev
2024-01-30 9:47 ` [PATCH 6.1.y 7/7] ASoC: codecs: ES8326: Update jact detection function kovalev
2024-02-03 1:13 ` [PATCH 6.1.y 0/7] ASoC: codecs: es8326: fix support Greg KH
2024-02-13 14:54 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240130094708.290485-5-kovalev@altlinux.org \
--to=kovalev@altlinux.org \
--cc=a.firago@yadro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=zhuning0077@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®