From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>
Cc: Stefan Binding <sbinding@opensource.cirrus.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: Re: [PATCH v1 2/5] ASoC: cs35l56: Add struct to index firmware registers
Date: Wed, 9 Apr 2025 12:33:50 +0100 [thread overview]
Message-ID: <4b00f887-143c-415d-a464-dc847b7d84d5@opensource.cirrus.com> (raw)
In-Reply-To: <f9fcff2f-34b6-4291-82d1-3b40c0f7e8e6@sirena.org.uk>
On 08/04/2025 5:00 pm, Mark Brown wrote:
> On Tue, Apr 08, 2025 at 01:58:23PM +0100, Richard Fitzgerald wrote:
>> On 07/04/2025 8:16 pm, Mark Brown wrote:
>
>>> This is fine but note that this is the use case that the regmap_field_
>>> APIs were created for, that also helps deal with things if anyone is
>>> clever and resizes fields or shifts within registers. It's purely a
>>> question of taste if you want to use that.
>
>> The regmap_field stuff looks like a lot of unnecessary complexity and
>> overhead just for 6 registers with alternate addresses.
>
> Yeah, like I say it's a taste thing.
>
If you would prefer us to use it we'll make the changes.
If not, then we'd like to keep the code as it is for now and in
future we'll have a look at regmap_field.
>> (In fact, the regmap_field stuff looks like an over-complex way of
>> solving a non-problem. The original commit is talking about replacing
>> masks and shifts "all over the code" to make the code neater. But
>> really, all those extra structs and pointers and allocated memory just
>> to replace a logical & or | ? Every struct regmap_field has a pointer
>> to the struct regmap !!?! So if I've got 100 fields there are 100 copies
>> of the struct regmap pointer that my driver already has.)
>
> It was for cases where the shifts and widths may also change, there's a
> bit more than applying a mask. Like you say it's got some overhead
> hence the taste thing.
Yes. If we had registers where the fields were moving around then there
would be better justification for using regmap_field.
next prev parent reply other threads:[~2025-04-09 11:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 15:16 [PATCH v1 0/5] Add support for CS35L63 Smart Amplifier Stefan Binding
2025-04-07 15:16 ` [PATCH v1 1/5] ASoC: cs35l56: Add Index based on ACPI HID or SDW ID to select regmap config Stefan Binding
2025-04-28 17:32 ` Richard Fitzgerald
2025-04-07 15:16 ` [PATCH v1 2/5] ASoC: cs35l56: Add struct to index firmware registers Stefan Binding
2025-04-07 19:16 ` Mark Brown
2025-04-08 12:58 ` Richard Fitzgerald
2025-04-08 16:00 ` Mark Brown
2025-04-09 11:33 ` Richard Fitzgerald [this message]
2025-04-09 12:31 ` Mark Brown
2025-04-28 17:34 ` Richard Fitzgerald
2025-05-05 23:46 ` Mark Brown
2025-04-07 15:16 ` [PATCH v1 3/5] ASoC: cs35l56: Add Mute, Volume and Posture registers to firmware register list Stefan Binding
2025-04-28 17:36 ` Richard Fitzgerald
2025-04-07 15:16 ` [PATCH v1 4/5] ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWire Stefan Binding
2025-04-28 17:38 ` Richard Fitzgerald
2025-04-07 15:16 ` [PATCH v1 5/5] ASoC: cs35l56: Read Silicon ID from DIE_STS registers for CS35L63 Stefan Binding
2025-04-28 17:39 ` Richard Fitzgerald
2025-05-07 11:12 ` [PATCH v1 0/5] Add support for CS35L63 Smart Amplifier 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=4b00f887-143c-415d-a464-dc847b7d84d5@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=sbinding@opensource.cirrus.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