2022-11-18 03:23:23

by Bard Liao

[permalink] [raw]
Subject: [PATCH v2 1/2] ASoC/soundwire: remove is_sdca boolean property

From: Pierre-Louis Bossart <[email protected]>

The Device_ID registers already tell us if a device supports the SDCA
specification or not, in hindsight we never needed a property when the
information is reported by both hardware and ACPI.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Rander Wang <[email protected]>
Reviewed-by: Péter Ujfalusi <[email protected]>
Signed-off-by: Bard Liao <[email protected]>
---
drivers/soundwire/bus.c | 4 ++--
include/linux/soundwire/sdw.h | 2 --
sound/soc/codecs/rt1316-sdw.c | 1 -
sound/soc/codecs/rt1318-sdw.c | 1 -
sound/soc/codecs/rt711-sdca-sdw.c | 1 -
5 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 76515c33e639..c23275b443ac 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -1587,7 +1587,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
goto io_err;
}

- if (slave->prop.is_sdca) {
+ if (slave->id.class_id) {
ret = sdw_read_no_pm(slave, SDW_DP0_INT);
if (ret < 0) {
dev_err(&slave->dev,
@@ -1724,7 +1724,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
goto io_err;
}

- if (slave->prop.is_sdca) {
+ if (slave->id.class_id) {
ret = sdw_read_no_pm(slave, SDW_DP0_INT);
if (ret < 0) {
dev_err(&slave->dev,
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index 9e4537f409c2..8fb458931772 100644
--- a/include/linux/soundwire/sdw.h
+++ b/include/linux/soundwire/sdw.h
@@ -365,7 +365,6 @@ struct sdw_dpn_prop {
* @sink_dpn_prop: Sink Data Port N properties
* @scp_int1_mask: SCP_INT1_MASK desired settings
* @quirks: bitmask identifying deltas from the MIPI specification
- * @is_sdca: the Slave supports the SDCA specification
*/
struct sdw_slave_prop {
u32 mipi_revision;
@@ -389,7 +388,6 @@ struct sdw_slave_prop {
struct sdw_dpn_prop *sink_dpn_prop;
u8 scp_int1_mask;
u32 quirks;
- bool is_sdca;
};

#define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0)
diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c
index 2db7ee6c6d33..fbc7e9c0254d 100644
--- a/sound/soc/codecs/rt1316-sdw.c
+++ b/sound/soc/codecs/rt1316-sdw.c
@@ -203,7 +203,6 @@ static int rt1316_read_prop(struct sdw_slave *slave)

prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY;
prop->quirks = SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY;
- prop->is_sdca = true;

prop->paging_support = true;

diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c
index f85f5ab2c6d0..8bc379215c34 100644
--- a/sound/soc/codecs/rt1318-sdw.c
+++ b/sound/soc/codecs/rt1318-sdw.c
@@ -353,7 +353,6 @@ static int rt1318_read_prop(struct sdw_slave *slave)

prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY;
prop->quirks = SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY;
- prop->is_sdca = true;

prop->paging_support = true;

diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c
index 88a8392a58ed..693e11ed8d08 100644
--- a/sound/soc/codecs/rt711-sdca-sdw.c
+++ b/sound/soc/codecs/rt711-sdca-sdw.c
@@ -186,7 +186,6 @@ static int rt711_sdca_read_prop(struct sdw_slave *slave)

prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY;
prop->quirks = SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY;
- prop->is_sdca = true;

prop->paging_support = true;

--
2.25.1



2022-11-18 15:57:35

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ASoC/soundwire: remove is_sdca boolean property

On Fri, Nov 18, 2022 at 10:58:06AM +0800, Bard Liao wrote:
> From: Pierre-Louis Bossart <[email protected]>
>
> The Device_ID registers already tell us if a device supports the SDCA
> specification or not, in hindsight we never needed a property when the
> information is reported by both hardware and ACPI.

Acked-by: Mark Brown <[email protected]>


Attachments:
(No filename) (379.00 B)
signature.asc (499.00 B)
Download all attachments

2022-11-23 10:06:57

by Charles Keepax

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ASoC/soundwire: remove is_sdca boolean property

On Fri, Nov 18, 2022 at 10:58:06AM +0800, Bard Liao wrote:
> From: Pierre-Louis Bossart <[email protected]>
>
> The Device_ID registers already tell us if a device supports the SDCA
> specification or not, in hindsight we never needed a property when the
> information is reported by both hardware and ACPI.
>
> Signed-off-by: Pierre-Louis Bossart <[email protected]>
> Reviewed-by: Rander Wang <[email protected]>
> Reviewed-by: P?ter Ujfalusi <[email protected]>
> Signed-off-by: Bard Liao <[email protected]>
> ---

Reviewed-by: Charles Keepax <[email protected]>

Thanks,
Charles

2022-11-23 15:39:04

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ASoC/soundwire: remove is_sdca boolean property

On 18-11-22, 15:39, Mark Brown wrote:
> On Fri, Nov 18, 2022 at 10:58:06AM +0800, Bard Liao wrote:
> > From: Pierre-Louis Bossart <[email protected]>
> >
> > The Device_ID registers already tell us if a device supports the SDCA
> > specification or not, in hindsight we never needed a property when the
> > information is reported by both hardware and ACPI.
>
> Acked-by: Mark Brown <[email protected]>

Hey Mark,

sound/soc/codecs/rt1318-sdw.c does not exist for me in sdw/next. Can I
get a tag for the changes merged into ASoC for this

Thanks
--
~Vinod

2022-11-23 16:05:01

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ASoC/soundwire: remove is_sdca boolean property

On Wed, Nov 23, 2022 at 08:22:14PM +0530, Vinod Koul wrote:
> On 18-11-22, 15:39, Mark Brown wrote:
> > On Fri, Nov 18, 2022 at 10:58:06AM +0800, Bard Liao wrote:
> > > From: Pierre-Louis Bossart <[email protected]>

> > > The Device_ID registers already tell us if a device supports the SDCA
> > > specification or not, in hindsight we never needed a property when the
> > > information is reported by both hardware and ACPI.

> > Acked-by: Mark Brown <[email protected]>

> sound/soc/codecs/rt1318-sdw.c does not exist for me in sdw/next. Can I
> get a tag for the changes merged into ASoC for this

Not reasonably, that's basically the entire tree since Linus doesn't
like branches.


Attachments:
(No filename) (722.00 B)
signature.asc (499.00 B)
Download all attachments

2022-11-23 17:21:43

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] ASoC/soundwire: remove is_sdca boolean property

On 23-11-22, 15:25, Mark Brown wrote:
> On Wed, Nov 23, 2022 at 08:22:14PM +0530, Vinod Koul wrote:
> > On 18-11-22, 15:39, Mark Brown wrote:
> > > On Fri, Nov 18, 2022 at 10:58:06AM +0800, Bard Liao wrote:
> > > > From: Pierre-Louis Bossart <[email protected]>
>
> > > > The Device_ID registers already tell us if a device supports the SDCA
> > > > specification or not, in hindsight we never needed a property when the
> > > > information is reported by both hardware and ACPI.
>
> > > Acked-by: Mark Brown <[email protected]>
>
> > sound/soc/codecs/rt1318-sdw.c does not exist for me in sdw/next. Can I
> > get a tag for the changes merged into ASoC for this
>
> Not reasonably, that's basically the entire tree since Linus doesn't
> like branches.

Okay.

Anyway we are close to merge window, lets postpone this after that

Thanks
--
~Vinod