mbox series

[v2,00/11] Support for CS42L83 on Apple machines

Message ID 20220915094444.11434-1-povik+lin@cutebit.org
Headers show
Series Support for CS42L83 on Apple machines | expand

Message

Martin Povišer Sept. 15, 2022, 9:44 a.m. UTC
[Changes for v2: Collected ack on compatible. Addressed Richard's
comments pertaining to error handling. Rebased. Switched to
dev_err_probe() in few places (added patch #11). Fixed authorship of
one of Richard's patches.]

Hi all,

there's a CS42L83 headphone jack codec found in Apple computers (in the
recent 'Apple Silicon' ones as well as in earlier models, one example
[1]). The part isn't publicly documented, but it appears almost
identical to CS42L42, for which we have a driver in kernel. This series
adapts the CS42L42 driver to the new part, and makes one change in
anticipation of a machine driver for the Apple computers.

Patch 1 adds new compatible to the cs42l42 schema.

Patches 2 to 7 are taken from Richard's recent series [2] adding
soundwire support to cs42l42. They are useful refactorings to build on
in the later patches, and also this way our work doesn't diverge. 
(I fixed missing free_irq path in cs42l42_init, did
 s/Soundwire/SoundWire/ in changelogs, rebased.)

Patch 8 exports some regmap-related symbols from cs42l42.c so they can
be used to create cs42l83 regmap in cs42l83-i2c.c later.

Patch 9 is the cs42l83 support proper.

Patch 10 implements 'set_bclk_ratio' on the cs42l42 core. This will be
called by the upcoming ASoC machine driver for 'Apple Silicon' Macs.
(We have touched on this change to be made in earlier discussion, see
 [3] and replies.)

Patch 11 brings cs42l42-i2c.c in sync with cs42l83-i2c.c on
dev_err_probe() usage.

Best,
Martin

[1] https://www.ifixit.com/Teardown/MacBook+Pro+13-Inch+Touch+Bar+2018+Teardown/111384
[2] https://lore.kernel.org/alsa-devel/20220819125230.42731-1-rf@opensource.cirrus.com/T/#mc05cc6898be2c23fe2e7c8bb4ea4e4a00c1912a7
[3] https://lore.kernel.org/asahi/8961DDD2-93FF-4A18-BCA2-90FCE298F517@cutebit.org/


Martin Povišer (5):
  ASoC: dt-bindings: cs42l42: Add 'cs42l83' compatible
  ASoC: cs42l42: Export regmap elements to core namespace
  ASoC: cs42l83: Extend CS42L42 support to new part
  ASoC: cs42l42: Implement 'set_bclk_ratio'
  ASoC: cs42l42: Switch to dev_err_probe() helper

Richard Fitzgerald (6):
  ASoC: cs42l42: Add bitclock frequency argument to cs42l42_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

 .../bindings/sound/cirrus,cs42l42.yaml        |   1 +
 MAINTAINERS                                   |   1 +
 include/sound/cs42l42.h                       |   1 +
 sound/soc/codecs/Kconfig                      |  15 +-
 sound/soc/codecs/Makefile                     |   6 +-
 sound/soc/codecs/cs42l42-i2c.c                | 106 +++++++
 sound/soc/codecs/cs42l42.c                    | 259 +++++++++---------
 sound/soc/codecs/cs42l42.h                    |  24 +-
 sound/soc/codecs/cs42l83-i2c.c                | 242 ++++++++++++++++
 9 files changed, 529 insertions(+), 126 deletions(-)
 create mode 100644 sound/soc/codecs/cs42l42-i2c.c
 create mode 100644 sound/soc/codecs/cs42l83-i2c.c

Comments

Mark Brown Sept. 20, 2022, 8:46 p.m. UTC | #1
On Thu, 15 Sep 2022 11:44:33 +0200, Martin Povišer wrote:
> [Changes for v2: Collected ack on compatible. Addressed Richard's
> comments pertaining to error handling. Rebased. Switched to
> dev_err_probe() in few places (added patch #11). Fixed authorship of
> one of Richard's patches.]
> 
> Hi all,
> 
> [...]

Applied to

   broonie/sound.git for-next

Thanks!

[01/11] ASoC: dt-bindings: cs42l42: Add 'cs42l83' compatible
        commit: 23162672ff85c24afc19293309500d3a63134ef8
[02/11] ASoC: cs42l42: Add bitclock frequency argument to cs42l42_pll_config()
        commit: 7e178946c3e4e64cebda4e60d0b7e5c02a502d13
[03/11] ASoC: cs42l42: Use cs42l42->dev instead of &i2c_client->dev
        commit: 2feab7e7d8c01b67d9ffbfb902d1591c08e9d564
[04/11] ASoC: cs42l42: Split probe() and remove() into stages
        commit: 0285042feda799edca63b35cea0cda32ed0c47c2
[05/11] ASoC: cs42l42: Split cs42l42_resume into two functions
        commit: 56746683c2560ba5604bb212f73eb01f5edfd312
[06/11] ASoC: cs42l42: Pass component and dai defs into common probe
        commit: 52c2e370df07092437d1515e773d28a5f53fc810
[07/11] ASoC: cs42l42: Split I2C identity into separate module
        commit: ae9f5e607da47104bc3d02e5c0ed237749f5db51
[08/11] ASoC: cs42l42: Export regmap elements to core namespace
        commit: 30b679e2cb058c3dcf6d3ebdf10999f0a7a1644d
[09/11] ASoC: cs42l83: Extend CS42L42 support to new part
        commit: 94d5f62a91aab6ac9c3f4abfd048cbe5f77153ac
[10/11] ASoC: cs42l42: Implement 'set_bclk_ratio'
        commit: ab2940a72dfa823af09abf593512459afe3da460
[11/11] ASoC: cs42l42: Switch to dev_err_probe() helper
        commit: ac088c31d496b885d8268bd1c9746c3c76bf7078

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark