diff mbox series

[v1] ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib

Message ID 20250518132451.707-1-shenghao-ding@ti.com
State New
Headers show
Series [v1] ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib | expand

Commit Message

Shenghao Ding May 18, 2025, 1:24 p.m. UTC
Drop the I2C in one comment, for these registers are also used in SPI
driver; Move the macro definition of TASDEVICE_CMD_XXX from tas2781.h to
tas2781_fmwlib.c, because the macros are only referenced in only fwlib.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

---
v1:
 - Correct the comment in tas2781.h.
 - Move the definition of TASDEVICE_CMD_XXX from tas2781.h to
   tas2781_fmwlib.c
---
 include/sound/tas2781.h           | 7 +------
 sound/soc/codecs/tas2781-fmwlib.c | 5 +++++
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Mark Brown May 20, 2025, 9:20 a.m. UTC | #1
On Sun, 18 May 2025 21:24:51 +0800, Shenghao Ding wrote:
> Drop the I2C in one comment, for these registers are also used in SPI
> driver; Move the macro definition of TASDEVICE_CMD_XXX from tas2781.h to
> tas2781_fmwlib.c, because the macros are only referenced in only fwlib.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib
      commit: e4dca67b2463e6abe775876c9cb049ea5b1c8e0d

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
diff mbox series

Patch

diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 442126aa124a..9dc178a7486a 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -49,7 +49,7 @@ 
 #define TASDEVICE_REG_SWRESET		TASDEVICE_REG(0x0, 0x0, 0x01)
 #define TASDEVICE_REG_SWRESET_RESET	BIT(0)
 
-/* I2C Checksum */
+/* Checksum */
 #define TASDEVICE_CHECKSUM_REG		TASDEVICE_REG(0x0, 0x0, 0x7e)
 
 /* XM_340 */
@@ -105,11 +105,6 @@ 
 #define TAS2781_RUNTIME_RE_REG_TF	TASDEVICE_REG(0x64, 0x62, 0x48)
 #define TAS2781_RUNTIME_RE_REG		TASDEVICE_REG(0x64, 0x63, 0x44)
 
-#define TASDEVICE_CMD_SING_W		0x1
-#define TASDEVICE_CMD_BURST		0x2
-#define TASDEVICE_CMD_DELAY		0x3
-#define TASDEVICE_CMD_FIELD_W		0x4
-
 enum audio_device {
 	TAS2563,
 	TAS2781,
diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index 28adfc5526bd..c9c1e608ddb7 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -50,6 +50,11 @@ 
 #define TAS2781_YRAM5_START_REG			TAS2781_YRAM3_START_REG
 #define TAS2781_YRAM5_END_REG			TAS2781_YRAM3_END_REG
 
+#define TASDEVICE_CMD_SING_W		0x1
+#define TASDEVICE_CMD_BURST		0x2
+#define TASDEVICE_CMD_DELAY		0x3
+#define TASDEVICE_CMD_FIELD_W		0x4
+
 #define TASDEVICE_MAXPROGRAM_NUM_KERNEL			5
 #define TASDEVICE_MAXCONFIG_NUM_KERNEL_MULTIPLE_AMPS	64
 #define TASDEVICE_MAXCONFIG_NUM_KERNEL			10