From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: chancel.liu@oss.nxp.com
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, david.rhodes@cirrus.com,
rf@opensource.cirrus.com, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH] ASoC: cs42xx8: Add SPI bus support for CS42448/CS42888 codec
Date: Mon, 1 Jun 2026 09:39:12 +0100 [thread overview]
Message-ID: <ah1FMEQroBCjOCD0@opensource.cirrus.com> (raw)
In-Reply-To: <20260601080224.1410292-1-chancel.liu@oss.nxp.com>
On Mon, Jun 01, 2026 at 05:02:24PM +0900, chancel.liu@oss.nxp.com wrote:
> From: Chancel Liu <chancel.liu@nxp.com>
>
> The existing cs42xx8 driver only supported I2C control interface.
> Add SPI bus support for the Cirrus Logic CS42448/CS42888 Audio CODEC.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> +static int cs42xx8_spi_probe(struct spi_device *spi)
> +{
> + struct cs42xx8_driver_data *drvdata;
> + struct regmap_config config;
> + int ret;
> +
> + drvdata = (struct cs42xx8_driver_data *)spi_get_device_match_data(spi);
> + if (!drvdata)
> + return dev_err_probe(&spi->dev, -EINVAL,
> + "failed to find driver data\n");
> +
> + config = cs42xx8_regmap_config;
> + /*
> + * reg_bits=16 makes regmap send a 2-byte address field (big-endian).
> + * write_flag_mask/read_flag_mask are OR'd into that address field:
> + */
> + config.reg_bits = 16;
> + config.write_flag_mask = 0x9E;
> + config.read_flag_mask = 0x9F;
> + config.reg_format_endian = REGMAP_ENDIAN_BIG;
Probably nicer to just update cs42xx8_regmap_config for the
endian, I believe this part is the same on both buses?
Otherwise looks fine to me.
Thanks,
Charles
next prev parent reply other threads:[~2026-06-01 9:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 8:02 [PATCH] ASoC: cs42xx8: Add SPI bus support for CS42448/CS42888 codec chancel.liu
2026-06-01 8:39 ` Charles Keepax [this message]
2026-06-02 5:31 ` Chancel Liu (OSS)
2026-06-01 16:53 ` Mark Brown
2026-06-02 6:25 ` Chancel Liu (OSS)
2026-06-02 8:44 ` Charles Keepax
2026-06-02 9:56 ` Chancel Liu (OSS)
2026-06-03 9:50 ` [PATCH v2 0/2] " chancel.liu
2026-06-03 9:50 ` [PATCH v2 1/2] ASoC: dt-bindings: cirrus,cs42xx8: Add SPI bus support chancel.liu
2026-06-03 9:50 ` [PATCH v2 2/2] ASoC: cs42xx8: Add SPI bus support for CS42448/CS42888 codec chancel.liu
2026-06-03 11:46 ` [PATCH v2 0/2] " Charles Keepax
2026-06-03 11:57 ` Mark Brown
2026-06-03 12:14 ` Chancel Liu (OSS)
2026-06-03 11:57 ` 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=ah1FMEQroBCjOCD0@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=chancel.liu@oss.nxp.com \
--cc=david.rhodes@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@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