From: Lucas Tanure <lucas.tanure@collabora.com>
To: David Rhodes <david.rhodes@cirrus.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>,
"Takashi Iwai --cc=alsa-devel @ alsa-project . org"
<tiwai@suse.com>
Cc: patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
kernel@collabora.com, Lucas Tanure <lucas.tanure@collabora.com>
Subject: [PATCH v4] ASoC: cs35l41: Steam Deck Shared boost properties quirk
Date: Thu, 9 Mar 2023 10:41:33 +0000 [thread overview]
Message-ID: <20230309104133.537056-1-lucas.tanure@collabora.com> (raw)
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@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
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(-)
diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index 1624510d09c0..2803ff0f0003 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -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)
--
2.39.2
next reply other threads:[~2023-03-09 10:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 10:41 Lucas Tanure [this message]
2023-03-09 10:42 ` Krzysztof Kozlowski
2023-03-09 11:04 ` Mark Brown
2023-03-09 11:17 ` Krzysztof Kozlowski
2023-03-09 11:19 ` Mark Brown
2023-03-09 11:25 ` Krzysztof Kozlowski
2023-03-09 14:04 ` Mark Brown
2023-03-09 16:20 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230309104133.537056-1-lucas.tanure@collabora.com \
--to=lucas.tanure@collabora.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=david.rhodes@cirrus.com \
--cc=kernel@collabora.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®