From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>,
Nikita Shubin <nikita.shubin@maquefel.me>,
David Rhodes <david.rhodes@cirrus.com>,
James Schulman <james.schulman@cirrus.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org,
Lucas Tanure <tanureal@opensource.cirrus.com>,
Mark Brown <broonie@kernel.org>,
patches@opensource.cirrus.com,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Takashi Iwai <tiwai@suse.com>
Subject: [PATCH 2/3] ASoC: cs4271: flat regcache, trivial simplifications
Date: Tue, 11 Apr 2023 00:39:01 +0200 [thread overview]
Message-ID: <20230410223902.2321834-3-alexander.sverdlin@gmail.com> (raw)
In-Reply-To: <20230410223902.2321834-1-alexander.sverdlin@gmail.com>
- Switch to REGCACHE_FLAT, the whole overhead of RBTREE is not worth it
with non sparse register set in the address range 1..7.
- Move register width to central location
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
sound/soc/codecs/cs4271-i2c.c | 1 -
sound/soc/codecs/cs4271-spi.c | 1 -
sound/soc/codecs/cs4271.c | 4 ++--
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/cs4271-i2c.c b/sound/soc/codecs/cs4271-i2c.c
index 0e8a7cf0da50..4033be1c3bc1 100644
--- a/sound/soc/codecs/cs4271-i2c.c
+++ b/sound/soc/codecs/cs4271-i2c.c
@@ -17,7 +17,6 @@ static int cs4271_i2c_probe(struct i2c_client *client)
config = cs4271_regmap_config;
config.reg_bits = 8;
- config.val_bits = 8;
return cs4271_probe(&client->dev,
devm_regmap_init_i2c(client, &config));
diff --git a/sound/soc/codecs/cs4271-spi.c b/sound/soc/codecs/cs4271-spi.c
index 7ef0a66b7778..4feb80436bd9 100644
--- a/sound/soc/codecs/cs4271-spi.c
+++ b/sound/soc/codecs/cs4271-spi.c
@@ -17,7 +17,6 @@ static int cs4271_spi_probe(struct spi_device *spi)
config = cs4271_regmap_config;
config.reg_bits = 16;
- config.val_bits = 8;
config.read_flag_mask = 0x21;
config.write_flag_mask = 0x20;
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index 2021cf442606..188b8b43c524 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -689,8 +689,8 @@ const struct regmap_config cs4271_regmap_config = {
.reg_defaults = cs4271_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
- .cache_type = REGCACHE_RBTREE,
-
+ .cache_type = REGCACHE_FLAT,
+ .val_bits = 8,
.volatile_reg = cs4271_volatile_reg,
};
EXPORT_SYMBOL_GPL(cs4271_regmap_config);
--
2.40.0
next prev parent reply other threads:[~2023-04-10 22:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 22:38 [PATCH 0/3] ASoC: ep93xx: Prepare for DT transition Alexander Sverdlin
2023-04-10 22:39 ` [PATCH 1/3] ASoC: ep93xx: i2s: move enable call to startup callback Alexander Sverdlin
2023-04-11 11:39 ` Mark Brown
2023-04-10 22:39 ` Alexander Sverdlin [this message]
2023-04-12 9:09 ` [PATCH 2/3] ASoC: cs4271: flat regcache, trivial simplifications Charles Keepax
2023-04-10 22:39 ` [PATCH 3/3] ASoC: ep93xx: i2s: Make it individually selectable Alexander Sverdlin
2023-04-11 14:19 ` [PATCH 0/3] ASoC: ep93xx: Prepare for DT transition Mark Brown
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=20230410223902.2321834-3-alexander.sverdlin@gmail.com \
--to=alexander.sverdlin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=james.schulman@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita.shubin@maquefel.me \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=tanureal@opensource.cirrus.com \
--cc=tiwai@suse.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®