Skip to contentSkip to conversation

ASoC: cs35l41: Steam Deck Shared boost properties quirk

PATCH Superseded Lucas Tanure 3 participants 8 messages Mar 9, 2023

Subsystems (3)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 ASoC: cs35l41: Steam Deck Shared boost properties quirk

Add support for Steam Deck bios old properties. If a Steam deck didn't upgrade the BIOS, the driver should be able to handle the previous properties for shared boost types.

---
Changes since V3:
- Fixed missing space in if statement
- Fix the build issue, as dependency patches are already merged

Changes since V2:
- sent the wrong patch with missing fixed lines
Changes since V1:
- else in same line as {

---
 sound/soc/codecs/cs35l41.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
sound/soc/codecs/cs35l41.c +9 -3
index 1624510d09c0..2803ff0f0003 100644
@@ -1022,9 +1022,15 @@ static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf
 	unsigned int val;
 	int ret;
 
-	ret = device_property_read_u32(dev, "cirrus,boost-type", &val);
-	if (ret >= 0)
-		hw_cfg->bst_type = val;
+	if (device_property_read_bool(dev, "cirrus,shared-boost-active")) {
+		hw_cfg->bst_type = CS35L41_SHD_BOOST_ACTV;
+	} else if (device_property_read_bool(dev, "cirrus,shared-boost-passive")) {
+		hw_cfg->bst_type = CS35L41_SHD_BOOST_PASS;
+	} else {
+		ret = device_property_read_u32(dev, "cirrus,boost-type", &val);
+		if (ret >= 0)
+			hw_cfg->bst_type = val;
+	}
 
 	ret = device_property_read_u32(dev, "cirrus,boost-peak-milliamp", &val);
 	if (ret >= 0)
Signature · 1 line
2.39.2
#1 lore raw
Quoted 24 lines · Lucas Tanure

Add support for Steam Deck bios old properties. If a Steam deck didn't upgrade the BIOS, the driver should be able to handle the previous properties for shared boost types.

---
Changes since V3:
- Fixed missing space in if statement
- Fix the build issue, as dependency patches are already merged

Changes since V2:
- sent the wrong patch with missing fixed lines
Changes since V1:
- else in same line as {

---
 sound/soc/codecs/cs35l41.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
sound/soc/codecs/cs35l41.c +0 -0
index 1624510d09c0..2803ff0f0003 100644

sound/soc/codecs/cs35l41.c static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf · line 1025

Quoted 7 lines
sound/soc/codecs/cs35l41.c +1 -3
@@ -1022,9 +1022,15 @@ static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf
 	unsigned int val;
 	int ret;
 
-	ret = device_property_read_u32(dev, "cirrus,boost-type", &val);
-	if (ret >= 0)
-		hw_cfg->bst_type = val;
+	if (device_property_read_bool(dev, "cirrus,shared-boost-active")) {

You are now changing ABI and adding undocumented properties.

NAK.

Best regards,
Krzysztof

maintainer
#2 lore raw
Quoted 1 line · Krzysztof Kozlowski

You are now changing ABI and adding undocumented properties.

This is newly added code, changes are fine.

#3 lore raw
Quoted 5 lines · Mark Brown
Quoted 1 line · Krzysztof Kozlowski

You are now changing ABI and adding undocumented properties.

This is newly added code, changes are fine.

OK, for the ABI code, but not for the undocumented properties. Commit does not explain that.

Best regards,
Krzysztof

maintainer
#4 lore raw
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · Mark Brown
Quoted 1 line · Krzysztof Kozlowski

You are now changing ABI and adding undocumented properties.

This is newly added code, changes are fine.

OK, for the ABI code, but not for the undocumented properties. Commit does not explain that.

It does, it says that it's adding support for the properties used in the firmware on existing Steam Decks. Those aren't even DT systems.

#5 lore raw
Quoted 6 lines · Mark Brown
Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Mark Brown
Quoted 1 line · Krzysztof Kozlowski

You are now changing ABI and adding undocumented properties.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

This is newly added code, changes are fine.

OK, for the ABI code, but not for the undocumented properties. Commit does not explain that.

It does, it says that it's adding support for the properties used in the firmware on existing Steam Decks. Those aren't even DT systems.

For some reason DT is cced...

The code unfortunately will allow to put them into DT and next time people will use it as an argument to document in the binding ("because driver already has them"). I heard this argument already many times.

Document then that these are not DT properties.

Best regards,
Krzysztof

maintainer
#6 lore raw
In reply to Krzysztof Kozlowski
Quoted 8 lines · Krzysztof Kozlowski

sound/soc/codecs/cs35l41.c static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf · line 1025

Quoted 4 lines · Lucas Tanure
sound/soc/codecs/cs35l41.c +1 -3
-	ret = device_property_read_u32(dev, "cirrus,boost-type", &val);
-	if (ret >= 0)
-		hw_cfg->bst_type = val;
+	if (device_property_read_bool(dev, "cirrus,shared-boost-active")) {

You are now changing ABI and adding undocumented properties.

Note also that this doesn't change the existing property, it continues to work identically.

maintainer
#7 lore raw
In reply to Lucas Tanure
Quoted 5 lines · Lucas Tanure

Add support for Steam Deck bios old properties. If a Steam deck didn't upgrade the BIOS, the driver should be able to handle the previous properties for shared boost types.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs35l41: Steam Deck Shared boost properties quirk

      commit: 8987986b07f5dded3f81b159f5bb146f2d1a21ed

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