[PATCH v3 4/5] ASoC: tas2781: Add tas2563 into driver

From: Shenghao Ding
Date: Mon Dec 25 2023 - 00:41:41 EST


Move tas2563 from tas2562 driver to tas2781 driver, because tas2563 only
work in bypass-DSP mode with tas2562 driver. In oder to enable DSP mode
for tas2563, it has been moved to tas2781 driver. As to the hardware part,
such as register setting and DSP firmware, all these are stored in the
binary firmware. What tas2781 drivder dooes is to parse the firmware and
download them to the tas2781 or tas2563, then power on tas2781 or tas2563.
So, tas2781 driver can be resued as tas2563 driver. Only attention will be
paid to downloading corresponding firmware.

Signed-off-by: Shenghao Ding <shenghao-ding@xxxxxx>

---
Change in v3:
- Add tas2563 to tas2781 driver
- Add more comments on why move tas2563 to tas2781 driver
- Provide rationale in terms of bindings and hardware, not in terms of driver.
Or at least not only.
---
sound/soc/codecs/tas2781-i2c.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 55cd5e3c23a5..c6afc87f2c69 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -5,9 +5,9 @@
// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
// https://www.ti.com
//
-// The TAS2781 driver implements a flexible and configurable
+// The TAS2781/TAS2563 driver implements a flexible and configurable
// algo coefficient setting for one, two, or even multiple
-// TAS2781 chips.
+// TAS2781/TAS2563 chips.
//
// Author: Shenghao Ding <shenghao-ding@xxxxxx>
// Author: Kevin Lu <kevin-lu@xxxxxx>
@@ -33,6 +33,7 @@

static const struct i2c_device_id tasdevice_id[] = {
{ "tas2781", TAS2781 },
+ { "tas2563", TAS2563 },
{}
};
MODULE_DEVICE_TABLE(i2c, tasdevice_id);
@@ -40,6 +41,7 @@ MODULE_DEVICE_TABLE(i2c, tasdevice_id);
#ifdef CONFIG_OF
static const struct of_device_id tasdevice_of_match[] = {
{ .compatible = "ti,tas2781" },
+ { .compatible = "ti,tas2563" },
{},
};
MODULE_DEVICE_TABLE(of, tasdevice_of_match);
--
2.34.1