From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>,
Stefan Binding <sbinding@opensource.cirrus.com>
Cc: 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: Tue, 8 Apr 2025 13:58:23 +0100 [thread overview]
Message-ID: <e3447ca4-ea19-4c84-802e-dc3832ea2dd6@opensource.cirrus.com> (raw)
In-Reply-To: <c1043fc8-40e3-4ff9-bade-bedfe7a19a18@sirena.org.uk>
On 07/04/2025 8:16 pm, Mark Brown wrote:
> On Mon, Apr 07, 2025 at 04:16:41PM +0100, Stefan Binding wrote:
>
>> Firmware based registers may be different addresses across different
>> device ids and revision ids. Create a structure to store and access
>> these addresses.
>
> 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.
(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.)
next prev parent reply other threads:[~2025-04-08 12:58 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 [this message]
2025-04-08 16:00 ` Mark Brown
2025-04-09 11:33 ` Richard Fitzgerald
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=e3447ca4-ea19-4c84-802e-dc3832ea2dd6@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