Skip to contentSkip to conversation

ASoC: rt5682s Minor modifications to look more sensibly

PATCH In review [email protected] 2 participants 2 messages Sep 29, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt5682s Minor modifications to look more sensibly

From: Derek Fang <[email protected]>

These modifications wouldn't affect the driver's behavior, but the code could look more sensibly.

1. Remove the volatile reg (0x0000) in reg_default.
2. Use dev_dbg instead of pr_debug.
3. Revise the macro RT5682S_PLLB_SRC_MASK to 0x1 because the mux is only two-source.

---
 sound/soc/codecs/rt5682s.c | 3 +--
 sound/soc/codecs/rt5682s.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5682s.c +1 -2
index d3e965b2e707..122adeb7beb1 100644
@@ -72,7 +72,6 @@ static void rt5682s_apply_patch_list(struct rt5682s_priv *rt5682s,
 }
 
 const struct reg_default rt5682s_reg[] = {
-	{0x0000, 0x0001},
 	{0x0002, 0x8080},
 	{0x0003, 0x0001},
 	{0x0005, 0x0000},
@@ -769,7 +768,7 @@ static int rt5682s_headset_detect(struct snd_soc_component *component, int jack_
 			count++;
 		} while (val == 0 && count < 50);
 
-		pr_debug("%s, val=%d, count=%d\n", __func__, val, count);
+		dev_dbg(component->dev, "%s, val=%d, count=%d\n", __func__, val, count);
 
 		switch (val) {
 		case 0x1:
sound/soc/codecs/rt5682s.h +1 -1
index 7c755e5efb81..55f1febb81e9 100644
@@ -1094,7 +1094,7 @@
 #define RT5682S_PLLA_K_BP_SFT			6
 
 /* PLL M/N/K Code Control 7 (0x009e) */
-#define RT5682S_PLLB_SRC_MASK			(0x3 << 0)
+#define RT5682S_PLLB_SRC_MASK			(0x1)
 #define RT5682S_PLLB_SRC_DFIN			(0x1)
 #define RT5682S_PLLB_SRC_PLLA			(0x0)
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 9 lines · On Wed, Sep 29, 2021 at 07:18:20PM +0800, [email protected] wrote:

From: Derek Fang <[email protected]>

These modifications wouldn't affect the driver's behavior, but the code could look more sensibly.

1. Remove the volatile reg (0x0000) in reg_default.
2. Use dev_dbg instead of pr_debug.
3. Revise the macro RT5682S_PLLB_SRC_MASK to 0x1 because the mux is only two-source.

This should be three separate patches as they're three different changes which don't really overlap.