Skip to content

Commit e4dca67

Browse files
Shenghao-Dingbroonie
authored andcommitted
ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib
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> Link: https://patch.msgid.link/20250518132451.707-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 152c773 commit e4dca67

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/sound/tas2781.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0x0, 0x01)
4848
#define TASDEVICE_REG_SWRESET_RESET BIT(0)
4949

50-
/* I2C Checksum */
50+
/* Checksum */
5151
#define TASDEVICE_CHECKSUM_REG TASDEVICE_REG(0x0, 0x0, 0x7e)
5252

5353
/* XM_340 */
@@ -103,11 +103,6 @@
103103
#define TAS2781_RUNTIME_RE_REG_TF TASDEVICE_REG(0x64, 0x62, 0x48)
104104
#define TAS2781_RUNTIME_RE_REG TASDEVICE_REG(0x64, 0x63, 0x44)
105105

106-
#define TASDEVICE_CMD_SING_W 0x1
107-
#define TASDEVICE_CMD_BURST 0x2
108-
#define TASDEVICE_CMD_DELAY 0x3
109-
#define TASDEVICE_CMD_FIELD_W 0x4
110-
111106
enum audio_device {
112107
TAS2563,
113108
TAS2781,

sound/soc/codecs/tas2781-fmwlib.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
#define TAS2781_YRAM5_START_REG TAS2781_YRAM3_START_REG
5151
#define TAS2781_YRAM5_END_REG TAS2781_YRAM3_END_REG
5252

53+
#define TASDEVICE_CMD_SING_W 0x1
54+
#define TASDEVICE_CMD_BURST 0x2
55+
#define TASDEVICE_CMD_DELAY 0x3
56+
#define TASDEVICE_CMD_FIELD_W 0x4
57+
5358
#define TASDEVICE_MAXPROGRAM_NUM_KERNEL 5
5459
#define TASDEVICE_MAXCONFIG_NUM_KERNEL_MULTIPLE_AMPS 64
5560
#define TASDEVICE_MAXCONFIG_NUM_KERNEL 10

0 commit comments

Comments
 (0)