lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230904125309.43350-1-krzysztof.kozlowski@linaro.org>
Date:   Mon,  4 Sep 2023 14:53:07 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Cc:     wangweidong.a@...nic.com,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH 1/3] ASoC: aw88261: drop undocumented, fake sync-flag property

The Devicetree sync-flag property was never accepted and is not allowed
by bindings.  It is not used by any upstream user, thus considering that
it was never documented, should be dropped.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

---

Not tested on hardware... but feature removed here could not work
according if conforming to documented interface.
---
 sound/soc/codecs/aw88261.c | 22 ++++------------------
 sound/soc/codecs/aw88261.h |  2 --
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index a697b5006b45..a5de7c704e73 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -633,28 +633,17 @@ static int aw88261_dev_stop(struct aw_device *aw_dev)
 	return 0;
 }
 
-static int aw88261_reg_update(struct aw88261 *aw88261, bool force)
+static int aw88261_reg_update(struct aw88261 *aw88261)
 {
 	struct aw_device *aw_dev = aw88261->aw_pa;
 	int ret;
 
-	if (force) {
-		ret = regmap_write(aw_dev->regmap,
-					AW88261_ID_REG, AW88261_SOFT_RESET_VALUE);
-		if (ret)
-			return ret;
-
+	if (aw_dev->prof_cur != aw_dev->prof_index) {
 		ret = aw88261_dev_fw_update(aw88261);
 		if (ret)
 			return ret;
 	} else {
-		if (aw_dev->prof_cur != aw_dev->prof_index) {
-			ret = aw88261_dev_fw_update(aw88261);
-			if (ret)
-				return ret;
-		} else {
-			ret = 0;
-		}
+		ret = 0;
 	}
 
 	aw_dev->prof_cur = aw_dev->prof_index;
@@ -667,7 +656,7 @@ static void aw88261_start_pa(struct aw88261 *aw88261)
 	int ret, i;
 
 	for (i = 0; i < AW88261_START_RETRIES; i++) {
-		ret = aw88261_reg_update(aw88261, aw88261->phase_sync);
+		ret = aw88261_reg_update(aw88261);
 		if (ret) {
 			dev_err(aw88261->aw_pa->dev, "fw update failed, cnt:%d\n", i);
 			continue;
@@ -1187,13 +1176,10 @@ static void aw88261_parse_channel_dt(struct aw88261 *aw88261)
 	struct aw_device *aw_dev = aw88261->aw_pa;
 	struct device_node *np = aw_dev->dev->of_node;
 	u32 channel_value = AW88261_DEV_DEFAULT_CH;
-	u32 sync_enable = false;
 
 	of_property_read_u32(np, "sound-channel", &channel_value);
-	of_property_read_u32(np, "sync-flag", &sync_enable);
 
 	aw_dev->channel = channel_value;
-	aw88261->phase_sync = sync_enable;
 }
 
 static int aw88261_init(struct aw88261 **aw88261, struct i2c_client *i2c, struct regmap *regmap)
diff --git a/sound/soc/codecs/aw88261.h b/sound/soc/codecs/aw88261.h
index 4f3dbf438510..ab9e3c52ecb6 100644
--- a/sound/soc/codecs/aw88261.h
+++ b/sound/soc/codecs/aw88261.h
@@ -452,8 +452,6 @@ struct aw88261 {
 	int frcset_en;
 	unsigned int mute_st;
 	unsigned int amppd_st;
-
-	unsigned char phase_sync;
 };
 
 #endif
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ