[PATCH v1] ASoC: tas2781: Clean up for some define

Do some clean up for some define in header file. Like change lower case in value, up case in define, space add in recommends, change date of files and add author.
Signed-off-by: Baojun Xu baojun.xu@ti.com --- include/sound/tas2781.h | 21 +++++++++++---------- sound/soc/codecs/tas2781-fmwlib.c | 7 ++++--- 2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h index 72d2060904f6..a2c8eb111e5f 100644 --- a/include/sound/tas2781.h +++ b/include/sound/tas2781.h @@ -2,7 +2,7 @@ // // ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier // -// Copyright (C) 2022 - 2024 Texas Instruments Incorporated +// Copyright (C) 2022 - 2025 Texas Instruments Incorporated // https://www.ti.com // // The TAS2563/TAS2781 driver implements a flexible and configurable @@ -11,6 +11,7 @@ // // Author: Shenghao Ding shenghao-ding@ti.com // Author: Kevin Lu kevin-lu@ti.com +// Author: Baojun Xu baojun.xu@ti.com //
#ifndef __TAS2781_H__ @@ -31,7 +32,7 @@ SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_S32_LE)
-/*PAGE Control Register (available in page0 of each book) */ +/* PAGE Control Register (available in page0 of each book) */ #define TASDEVICE_PAGE_SELECT 0x00 #define TASDEVICE_BOOKCTL_PAGE 0x00 #define TASDEVICE_BOOKCTL_REG 127 @@ -42,12 +43,12 @@ #define TASDEVICE_REG(book, page, reg) (((book * 256 * 128) + \ (page * 128)) + reg)
-/*Software Reset */ -#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0X0, 0x01) +/* Software Reset */ +#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0x0, 0x01) #define TASDEVICE_REG_SWRESET_RESET BIT(0)
-/*I2C Checksum */ -#define TASDEVICE_I2CChecksum TASDEVICE_REG(0x0, 0x0, 0x7E) +/* I2C Checksum */ +#define TASDEVICE_CHECKSUM_REG TASDEVICE_REG(0x0, 0x0, 0x7e)
/* XM_340 */ #define TASDEVICE_XM_A1_REG TASDEVICE_REG(0x64, 0x63, 0x3c) @@ -55,8 +56,8 @@ #define TASDEVICE_XM_A2_REG TASDEVICE_REG(0x64, 0x63, 0x38)
/* Volume control */ -#define TAS2563_DVC_LVL TASDEVICE_REG(0x00, 0x02, 0x0C) -#define TAS2781_DVC_LVL TASDEVICE_REG(0x0, 0x0, 0x1A) +#define TAS2563_DVC_LVL TASDEVICE_REG(0x00, 0x02, 0x0c) +#define TAS2781_DVC_LVL TASDEVICE_REG(0x0, 0x0, 0x1a) #define TAS2781_AMP_LEVEL TASDEVICE_REG(0x0, 0x0, 0x03) #define TAS2781_AMP_LEVEL_MASK GENMASK(5, 1)
@@ -95,8 +96,8 @@ #define TAS2781_PRM_SINEGAIN_REG TASDEVICE_REG(0x00, 0x14, 0x40) #define TAS2781_PRM_SINEGAIN2_REG TASDEVICE_REG(0x00, 0x14, 0x44)
-#define TAS2781_TEST_UNLOCK_REG TASDEVICE_REG(0x00, 0xFD, 0x0D) -#define TAS2781_TEST_PAGE_UNLOCK 0x0D +#define TAS2781_TEST_UNLOCK_REG TASDEVICE_REG(0x00, 0xfd, 0x0d) +#define TAS2781_TEST_PAGE_UNLOCK 0x0d
#define TAS2781_RUNTIME_LATCH_RE_REG TASDEVICE_REG(0x00, 0x00, 0x49) #define TAS2781_RUNTIME_RE_REG_TF TASDEVICE_REG(0x64, 0x62, 0x48) diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c index 61d9c220b6a4..bc2f68bd9846 100644 --- a/sound/soc/codecs/tas2781-fmwlib.c +++ b/sound/soc/codecs/tas2781-fmwlib.c @@ -2,9 +2,10 @@ // // tas2781-fmwlib.c -- TASDEVICE firmware support // -// Copyright 2023 - 2024 Texas Instruments, Inc. +// Copyright 2023 - 2025 Texas Instruments, Inc. // // Author: Shenghao Ding shenghao-ding@ti.com +// Author: Baojun Xu baojun.xu@ti.com
#include <linux/crc8.h> #include <linux/firmware.h> @@ -1496,7 +1497,7 @@ static int tasdev_block_chksum(struct tasdevice_priv *tas_priv, unsigned int nr_value; int ret;
- ret = tasdevice_dev_read(tas_priv, chn, TASDEVICE_I2CChecksum, + ret = tasdevice_dev_read(tas_priv, chn, TASDEVICE_CHECKSUM_REG, &nr_value); if (ret < 0) { dev_err(tas_priv->dev, "%s: Chn %d\n", __func__, chn); @@ -1540,7 +1541,7 @@ static int tasdev_load_blk(struct tasdevice_priv *tas_priv, while (block->nr_retry > 0) { if (block->is_pchksum_present) { ret = tasdevice_dev_write(tas_priv, chn, - TASDEVICE_I2CChecksum, 0); + TASDEVICE_CHECKSUM_REG, 0); if (ret < 0) break; }

On Wed, 26 Feb 2025 22:43:28 +0800, Baojun Xu wrote:
Do some clean up for some define in header file. Like change lower case in value, up case in define, space add in recommends, change date of files and add author.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: tas2781: Clean up for some define commit: be1e3607f29a5a182eaa70e3058aef32fd0cc4f8
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
participants (1)
-
Baojun Xu
-
Mark Brown