All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add bridged amplifiers to cs42l43
@ 2024-03-26 14:11 Charles Keepax
  2024-03-26 14:11 ` [PATCH 1/3] gpio: swnode: Add ability to specify native chip selects for SPI Charles Keepax
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Charles Keepax @ 2024-03-26 14:11 UTC (permalink / raw)
  To: broonie, linus.walleij, brgl; +Cc: linux-gpio, linux-spi, patches

On 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

Charles Keepax (2):
  gpio: swnode: Add ability to specify native chip selects for SPI
  spi: Add a mechanism to use the fwnode name for the SPI device

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

 drivers/gpio/gpiolib-swnode.c |   8 ++
 drivers/gpio/gpiolib.c        |   9 ++
 drivers/spi/spi-cs42l43.c     | 152 +++++++++++++++++++++++++++++++++-
 drivers/spi/spi.c             |   7 ++
 include/linux/gpio/consumer.h |   4 +
 include/linux/spi/spi.h       |   2 +
 6 files changed, 181 insertions(+), 1 deletion(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/3] Add bridged amplifiers to cs42l43
@ 2024-03-28 14:01 Charles Keepax
  0 siblings, 0 replies; 13+ messages in thread
From: Charles Keepax @ 2024-03-28 14:01 UTC (permalink / raw)
  To: broonie, linus.walleij, brgl; +Cc: linux-gpio, linux-spi, patches

On 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 v1:
 - Add missing statics in driver/spi/spi-cs42l43.c

Charles Keepax (2):
  gpio: swnode: Add ability to specify native chip selects for SPI
  spi: Add a mechanism to use the fwnode name for the SPI device

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

 drivers/gpio/gpiolib-swnode.c |   8 ++
 drivers/gpio/gpiolib.c        |   9 ++
 drivers/spi/spi-cs42l43.c     | 152 +++++++++++++++++++++++++++++++++-
 drivers/spi/spi.c             |   7 ++
 include/linux/gpio/consumer.h |   4 +
 include/linux/spi/spi.h       |   2 +
 6 files changed, 181 insertions(+), 1 deletion(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/3] Add bridged amplifiers to cs42l43
@ 2024-03-29 11:47 Charles Keepax
  0 siblings, 0 replies; 13+ messages in thread
From: Charles Keepax @ 2024-03-29 11:47 UTC (permalink / raw)
  To: broonie, linus.walleij, brgl; +Cc: linux-gpio, linux-spi, patches

On 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 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 (2):
  gpio: swnode: Add ability to specify native chip selects for SPI
  spi: Add a mechanism to use the fwnode name for the SPI device

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

 drivers/gpio/gpiolib-swnode.c |   8 ++
 drivers/gpio/gpiolib.c        |   9 ++
 drivers/spi/spi-cs42l43.c     | 155 +++++++++++++++++++++++++++++++++-
 drivers/spi/spi.c             |   7 ++
 include/linux/gpio/consumer.h |   4 +
 include/linux/spi/spi.h       |   2 +
 6 files changed, 184 insertions(+), 1 deletion(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH 0/3] Add bridged amplifiers to cs42l43
@ 2024-04-09 13:21 Charles Keepax
  0 siblings, 0 replies; 13+ messages in thread
From: Charles Keepax @ 2024-04-09 13:21 UTC (permalink / raw)
  To: broonie, linus.walleij, brgl; +Cc: linux-gpio, linux-spi, patches

On 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 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 (2):
  gpio: swnode: Add ability to specify native chip selects for SPI
  spi: Add a mechanism to use the fwnode name for the SPI device

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

 drivers/gpio/Kconfig          |   9 +++
 drivers/gpio/gpiolib-swnode.c |  38 ++++++++++
 drivers/spi/Kconfig           |   1 +
 drivers/spi/spi-cs42l43.c     | 139 +++++++++++++++++++++++++++++++++-
 drivers/spi/spi.c             |   6 ++
 include/linux/gpio/consumer.h |   4 +
 6 files changed, 195 insertions(+), 2 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2024-04-09 13:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 14:11 [PATCH 0/3] Add bridged amplifiers to cs42l43 Charles Keepax
2024-03-26 14:11 ` [PATCH 1/3] gpio: swnode: Add ability to specify native chip selects for SPI Charles Keepax
2024-04-04  8:16   ` Linus Walleij
2024-04-08 13:21     ` Charles Keepax
2024-04-09  7:12       ` Linus Walleij
2024-04-09  8:44         ` Charles Keepax
2024-03-26 14:11 ` [PATCH 2/3] spi: Add a mechanism to use the fwnode name for the SPI device Charles Keepax
2024-03-26 14:11 ` [PATCH 3/3] spi: cs42l43: Add bridged cs35l56 amplifiers Charles Keepax
2024-03-27 18:34   ` kernel test robot
2024-03-28 13:15   ` kernel test robot
2024-03-28 14:01 [PATCH 0/3] Add bridged amplifiers to cs42l43 Charles Keepax
2024-03-29 11:47 Charles Keepax
2024-04-09 13:21 Charles Keepax

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.