RE: [PATCH] ASoC: cs42xx8: Add SPI bus support for CS42448/CS42888 codec
From: Chancel Liu (OSS)
Date: Tue Jun 02 2026 - 01:32:25 EST
> > From: Chancel Liu <chancel.liu@xxxxxxx>
> >
> > 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@xxxxxxx>
> > +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
Okay. I'll move format endian into common regmap config.
Regards,
Chancel Liu