Skip to content

Add bridged amplifiers to cs42l43

Charles Keepax linux-gpio linux-spi 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 3 repliesIn review
  2. v64 patches 7 repliesSuperseded
  3. v54 patches 17 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v43 patches9 repliesSuperseded
v33 patches10 repliesSuperseded
v23 patches1 replySuperseded
v13 patches6 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4gpio: swnode: Add ability to specify native chip selects for SPIdrivers/gpio/Kconfig drivers/gpio/gpiolib-swnode.c include/linux/gpio/property.h+57 -00 replies
2/4spi: Switch to using is_acpi_device_node() in spi_dev_set_name()drivers/spi/spi.c+4 -30 replies
3/4spi: Update swnode based SPI devices to use the fwnode namedrivers/spi/spi.c+5 -00 replies
4/4spi: cs42l43: Add bridged cs35l56 amplifiersdrivers/spi/Kconfig drivers/spi/spi-cs42l43.c+120 -42 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchLinus WalleijAndy Shevchenko
1/4R-b R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/4] Add bridged amplifiers to cs42l43

In some cs42l43 systems a couple of cs35l56 amplifiers are attached to the cs42l43's SPI and I2S. On Windows the cs42l43 is controlled by a SDCA class driver and these two amplifiers are controlled by firmware running on the cs42l43. However, under Linux the decision was made to interact with the cs42l43 directly, affording the user greater control over the audio system. However, this has resulted in an issue where these two bridged cs35l56 amplifiers are not populated in ACPI and must be added manually. There is at least an SDCA extension unit DT entry we can key off.

The process of adding this is handled using a software node, firstly the ability to add native chip selects to software nodes must be added. Secondly, an additional flag for naming the SPI devices is added this allows the machine driver to key to the correct amplifier. Then finally, the cs42l43 SPI driver adds the two amplifiers directly onto its SPI bus.

An additional series will follow soon to add the audio machine driver parts (in the sof-sdw driver), however that is fairly orthogonal to this part of the process, getting the actual amplifiers registered.

Thanks,
Charles

Series changes since v6:
- Use devm_add_action to free swnode

Series changes since v5:
- Add back help for GPIO_SWNODE_UNDEFINED
- Correct some typos
- Only check for undefined swnode if the Kconfig is set
- Add a pr_fmt
- Move swnode_gpio_undefined to include/linux/gpio/property.h
- Remove includes of fwnode.h
- Use %pwfP to get firmware node name
- Remove NULL check on acpi_handle

Series changes since v4:
- Remove extraneous fwnode_handle_puts in driver/spi/spi-cs42l43.c
- Make Kconfig for swnode undef gpios not user visible
- Add some missing headers
- Add patch to update handling in spi_dev_set_name
- Remove stray blank line
- Use ACPI_HANDLE_FWNODE

Series changes since v3:
- Add Kconfig to make swnode conditionally built
- Add define for swnode name
- Add custom init and exit calls to register swnode
- Use export namespaces
- Always name swnode SPI devices after the node name
- Correct some header includes
- Use HZ_PER_MHZ
- Use some swnode helper macros
- Use acpi_get_local_address
- Correct some handle puts
- Add some dev_err_probes

Series changes since v2:
- Add missing fwnode_handle_puts in driver/spi/spi-cs423l43.c

Series changes since v1:
- Add missing statics in driver/spi/spi-cs42l43.c

Charles Keepax (3):
gpio: swnode: Add ability to specify native chip selects for SPI
spi: Switch to using is_acpi_device_node() in spi_dev_set_name()
spi: Update swnode based SPI devices to use the fwnode name

Maciej Strozek (1):
spi: cs42l43: Add bridged cs35l56 amplifiers

 drivers/gpio/Kconfig          |   9 +++
 drivers/gpio/gpiolib-swnode.c |  44 ++++++++++++
 drivers/spi/Kconfig           |   1 +
 drivers/spi/spi-cs42l43.c     | 123 ++++++++++++++++++++++++++++++++--
 drivers/spi/spi.c             |  12 +++-
 include/linux/gpio/property.h |   4 ++
 6 files changed, 186 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.2