[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230301123933.17234-1-lucas.tanure@collabora.com>
Date: Wed, 1 Mar 2023 12:39:33 +0000
From: Lucas Tanure <lucas.tanure@...labora.com>
To: David Rhodes <david.rhodes@...rus.com>,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Liam Girdwood <lgirdwood@...il.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
"Takashi Iwai --cc=alsa-devel @ alsa-project . org" <tiwai@...e.com>
Cc: patches@...nsource.cirrus.com, linux-kernel@...r.kernel.org,
kernel@...labora.com, Lucas Tanure <lucas.tanure@...labora.com>
Subject: [PATCH v2] 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.
Signed-off-by: Lucas Tanure <lucas.tanure@...labora.com>
Acked-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
---
Changes since V1:
- else in same line as {
---
sound/soc/codecs/cs35l41.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index c223d83e02cf..56efbac929f0 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -1037,9 +1037,16 @@ 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)
--
2.39.2
Powered by blists - more mailing lists