[PATCH v2 0/4] ASoC: codecs: wcd937x/8x/9x: cleanup

srinivas.kandagatla@oss.qualcomm.com posted 4 patches 3 months ago
drivers/soundwire/bus.c        | 12 ++++++++++++
drivers/soundwire/slave.c      |  6 ++++++
include/linux/soundwire/sdw.h  | 17 +++++++++++++++++
sound/soc/codecs/wcd937x-sdw.c |  6 ------
sound/soc/codecs/wcd937x.c     |  4 ++--
sound/soc/codecs/wcd937x.h     |  2 --
sound/soc/codecs/wcd938x-sdw.c | 17 -----------------
sound/soc/codecs/wcd938x.c     |  7 +++----
sound/soc/codecs/wcd938x.h     | 13 -------------
sound/soc/codecs/wcd939x-sdw.c | 13 -------------
sound/soc/codecs/wcd939x.c     |  6 +++---
sound/soc/codecs/wcd939x.h     | 13 -------------
12 files changed, 43 insertions(+), 73 deletions(-)
[PATCH v2 0/4] ASoC: codecs: wcd937x/8x/9x: cleanup
Posted by srinivas.kandagatla@oss.qualcomm.com 3 months ago
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

All these 3 codecs have been duplicating two of the soundwire
functions. Noticed another new driver starting to do the same, its time
to make some helpers so that we do not duplicate these functions.

I have added two helpers of_sdw_find_device_by_node() and
sdw_slave_get_current_bank() in soundwire layer for the codecs to use them.

Changes since v1:
	- updated sdw_slave_get_current_bank do error checks on read

Srinivas Kandagatla (4):
  soundwire: bus: add of_sdw_find_device_by_node helper
  soundwire: bus: add sdw_slave_get_current_bank helper
  ASoC: codecs: wcdxxxx: use of_sdw_find_device_by_node helper
  ASoC: codecs: wcdxxxx: use sdw_slave_get_current_bank helper

 drivers/soundwire/bus.c        | 12 ++++++++++++
 drivers/soundwire/slave.c      |  6 ++++++
 include/linux/soundwire/sdw.h  | 17 +++++++++++++++++
 sound/soc/codecs/wcd937x-sdw.c |  6 ------
 sound/soc/codecs/wcd937x.c     |  4 ++--
 sound/soc/codecs/wcd937x.h     |  2 --
 sound/soc/codecs/wcd938x-sdw.c | 17 -----------------
 sound/soc/codecs/wcd938x.c     |  7 +++----
 sound/soc/codecs/wcd938x.h     | 13 -------------
 sound/soc/codecs/wcd939x-sdw.c | 13 -------------
 sound/soc/codecs/wcd939x.c     |  6 +++---
 sound/soc/codecs/wcd939x.h     | 13 -------------
 12 files changed, 43 insertions(+), 73 deletions(-)

-- 
2.49.0
Re: [PATCH v2 0/4] ASoC: codecs: wcd937x/8x/9x: cleanup
Posted by Srinivas Kandagatla 1 month, 3 weeks ago
Hi Vinod,
On 7/4/25 1:12 PM, srinivas.kandagatla@oss.qualcomm.com wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> 
> All these 3 codecs have been duplicating two of the soundwire
> functions. Noticed another new driver starting to do the same, its time
> to make some helpers so that we do not duplicate these functions.
> 
> I have added two helpers of_sdw_find_device_by_node() and
> sdw_slave_get_current_bank() in soundwire layer for the codecs to use them.
> 
> Changes since v1:
> 	- updated sdw_slave_get_current_bank do error checks on read
> 
> Srinivas Kandagatla (4):
>   soundwire: bus: add of_sdw_find_device_by_node helper
>   soundwire: bus: add sdw_slave_get_current_bank helper


Do you have any comments these two soundwire patches in this series?

--srini

>   ASoC: codecs: wcdxxxx: use of_sdw_find_device_by_node helper
>   ASoC: codecs: wcdxxxx: use sdw_slave_get_current_bank helper
> 
>  drivers/soundwire/bus.c        | 12 ++++++++++++
>  drivers/soundwire/slave.c      |  6 ++++++
>  include/linux/soundwire/sdw.h  | 17 +++++++++++++++++
>  sound/soc/codecs/wcd937x-sdw.c |  6 ------
>  sound/soc/codecs/wcd937x.c     |  4 ++--
>  sound/soc/codecs/wcd937x.h     |  2 --
>  sound/soc/codecs/wcd938x-sdw.c | 17 -----------------
>  sound/soc/codecs/wcd938x.c     |  7 +++----
>  sound/soc/codecs/wcd938x.h     | 13 -------------
>  sound/soc/codecs/wcd939x-sdw.c | 13 -------------
>  sound/soc/codecs/wcd939x.c     |  6 +++---
>  sound/soc/codecs/wcd939x.h     | 13 -------------
>  12 files changed, 43 insertions(+), 73 deletions(-)
>
Re: [PATCH v2 0/4] ASoC: codecs: wcd937x/8x/9x: cleanup
Posted by Vinod Koul 1 month, 2 weeks ago
On 15-08-25, 06:32, Srinivas Kandagatla wrote:
> Hi Vinod,
> On 7/4/25 1:12 PM, srinivas.kandagatla@oss.qualcomm.com wrote:
> > From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> > 
> > All these 3 codecs have been duplicating two of the soundwire
> > functions. Noticed another new driver starting to do the same, its time
> > to make some helpers so that we do not duplicate these functions.
> > 
> > I have added two helpers of_sdw_find_device_by_node() and
> > sdw_slave_get_current_bank() in soundwire layer for the codecs to use them.
> > 
> > Changes since v1:
> > 	- updated sdw_slave_get_current_bank do error checks on read
> > 
> > Srinivas Kandagatla (4):
> >   soundwire: bus: add of_sdw_find_device_by_node helper
> >   soundwire: bus: add sdw_slave_get_current_bank helper
> 
> 
> Do you have any comments these two soundwire patches in this series?

Yes I am nota  helpers like this, but I dont think it is big deal so:

Acked-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod