linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] ASoC: cs42l42: Add Soundwire support
@ 2022-08-19 12:52 Richard Fitzgerald
  2022-08-19 12:52 ` [PATCH 01/12] ASoC: cs42l42: Add SOFT_RESET_REBOOT register Richard Fitzgerald
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Richard Fitzgerald @ 2022-08-19 12:52 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

The CS42L42 has a Soundwire interface for control and audio. This
chain of patches adds support for this.

Patches #1 .. #10 split out various changes to the existing code that
are needed for adding Soundwire. These are mostly around clocking and
supporting the separate probe and enumeration stages in Soundwire.

Patches #11 and #12 actually add the Soundwire handling.

Richard Fitzgerald (12):
  ASoC: cs42l42: Add SOFT_RESET_REBOOT register
  ASoC: cs42l42: Add bitclock frequency argument to cs42l42_pll_config()
  ASoC: cs42l42: Ensure MCLKint is a multiple of the sample rate
  ASoC: cs42l42: Separate ASP config from PLL config
  ASoC: cs42l42: Use cs42l42->dev instead of &i2c_client->dev
  ASoC: cs42l42: Split probe() and remove() into stages
  ASoC: cs42l42: Split cs42l42_resume into two functions
  ASoC: cs42l42: Pass component and dai defs into common probe
  ASoC: cs42l42: Split I2C identity into separate module
  ASoC: cs42l42: Export some functions for Soundwire
  ASoC: cs42l42: Add Soundwire support
  ASoC: cs42l42: Add support for Soundwire interrupts

 include/sound/cs42l42.h        |   5 +
 sound/soc/codecs/Kconfig       |  14 +-
 sound/soc/codecs/Makefile      |   6 +-
 sound/soc/codecs/cs42l42-i2c.c | 107 +++++
 sound/soc/codecs/cs42l42-sdw.c | 689 +++++++++++++++++++++++++++++++++
 sound/soc/codecs/cs42l42.c     | 359 +++++++++--------
 sound/soc/codecs/cs42l42.h     |  30 +-
 7 files changed, 1049 insertions(+), 161 deletions(-)
 create mode 100644 sound/soc/codecs/cs42l42-i2c.c
 create mode 100644 sound/soc/codecs/cs42l42-sdw.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: [PATCH 09/12] ASoC: cs42l42: Split I2C identity into separate module
@ 2022-09-08 16:03 Martin Povišer
  0 siblings, 0 replies; 22+ messages in thread
From: Martin Povišer @ 2022-09-08 16:03 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: Mark Brown, patches, alsa-devel, linux-kernel


> On 19. 8. 2022, at 14:52, Richard Fitzgerald <rf@opensource.cirrus.com> wrote:
>
> Split the I2C bus driver definition and probe()/remove() into a
> separate module so that a Soundwire build of CS42L42 support does
> not have a spurious dependency on I2C.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---


> +static int cs42l42_i2c_probe(struct i2c_client *i2c_client)
> +{
> +	struct device *dev = &i2c_client->dev;
> +	struct cs42l42_private *cs42l42;
> +	struct regmap *regmap;
> +	int ret;
> +
> +	cs42l42 = devm_kzalloc(dev, sizeof(*cs42l42), GFP_KERNEL);
> +	if (!cs42l42)
> +		return -ENOMEM;
> +
> +	regmap = devm_regmap_init_i2c(i2c_client, &cs42l42_regmap);
> +	if (IS_ERR(regmap)) {
> +		ret = PTR_ERR(regmap);
> +		dev_err(&i2c_client->dev, "regmap_init() failed: %d\n", ret);
> +		return ret;
> +	}
> +
> +	cs42l42->dev = dev;
> +	cs42l42->regmap = regmap;
> +	cs42l42->irq = i2c_client->irq;
> +
> +	ret = cs42l42_common_probe(cs42l42, &cs42l42_soc_component, &cs42l42_dai);
> +	if (ret)
> +		return ret;
> +
> +	return cs42l42_init(cs42l42);

The common_remove should probably be called here if the init fails.

Best,
Martin

> +}
> +
> +static int cs42l42_i2c_remove(struct i2c_client *i2c_client)
> +{
> +	struct cs42l42_private *cs42l42 = dev_get_drvdata(&i2c_client->dev);
> +
> +	cs42l42_common_remove(cs42l42);
> +
> +	return 0;
> +}


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-09-23 16:54 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-19 12:52 [PATCH 00/12] ASoC: cs42l42: Add Soundwire support Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 01/12] ASoC: cs42l42: Add SOFT_RESET_REBOOT register Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 02/12] ASoC: cs42l42: Add bitclock frequency argument to cs42l42_pll_config() Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 03/12] ASoC: cs42l42: Ensure MCLKint is a multiple of the sample rate Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 04/12] ASoC: cs42l42: Separate ASP config from PLL config Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 05/12] ASoC: cs42l42: Use cs42l42->dev instead of &i2c_client->dev Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 06/12] ASoC: cs42l42: Split probe() and remove() into stages Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 07/12] ASoC: cs42l42: Split cs42l42_resume into two functions Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 08/12] ASoC: cs42l42: Pass component and dai defs into common probe Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 09/12] ASoC: cs42l42: Split I2C identity into separate module Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 10/12] ASoC: cs42l42: Export some functions for Soundwire Richard Fitzgerald
2022-08-19 12:52 ` [PATCH 11/12] ASoC: cs42l42: Add Soundwire support Richard Fitzgerald
2022-08-22 11:15   ` Pierre-Louis Bossart
2022-08-22 13:50     ` Richard Fitzgerald
2022-08-22 14:55       ` Pierre-Louis Bossart
2022-08-22 16:31         ` Richard Fitzgerald
2022-08-22 17:15           ` Pierre-Louis Bossart
2022-08-19 12:52 ` [PATCH 12/12] ASoC: cs42l42: Add support for Soundwire interrupts Richard Fitzgerald
2022-08-22 11:33   ` Pierre-Louis Bossart
2022-08-22 15:01     ` Richard Fitzgerald
2022-09-23 16:54 ` [PATCH 00/12] ASoC: cs42l42: Add Soundwire support Mark Brown
2022-09-08 16:03 [PATCH 09/12] ASoC: cs42l42: Split I2C identity into separate module Martin Povišer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).