summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tas2781-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/tas2781-i2c.c')
-rw-r--r--sound/soc/codecs/tas2781-i2c.c130
1 files changed, 89 insertions, 41 deletions
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 1539b70881d1..d1c76ab0144d 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -105,11 +105,20 @@ static const struct i2c_device_id tasdevice_id[] = {
{ "tas2120", TAS2120 },
{ "tas2320", TAS2320 },
{ "tas2563", TAS2563 },
+ { "tas2568", TAS2568 },
{ "tas2570", TAS2570 },
{ "tas2572", TAS2572 },
+ { "tas2574", TAS2574 },
{ "tas2781", TAS2781 },
+ { "tas5802", TAS5802 },
+ { "tas5806m", TAS5806M },
+ { "tas5806md", TAS5806MD },
+ { "tas5815", TAS5815 },
+ { "tas5822", TAS5822 },
{ "tas5825", TAS5825 },
{ "tas5827", TAS5827 },
+ { "tas5828", TAS5828 },
+ { "tas5830", TAS5830 },
{}
};
MODULE_DEVICE_TABLE(i2c, tasdevice_id);
@@ -121,11 +130,20 @@ static const struct of_device_id tasdevice_of_match[] = {
{ .compatible = "ti,tas2120" },
{ .compatible = "ti,tas2320" },
{ .compatible = "ti,tas2563" },
+ { .compatible = "ti,tas2568" },
{ .compatible = "ti,tas2570" },
{ .compatible = "ti,tas2572" },
+ { .compatible = "ti,tas2574" },
{ .compatible = "ti,tas2781" },
+ { .compatible = "ti,tas5802" },
+ { .compatible = "ti,tas5806m" },
+ { .compatible = "ti,tas5806md" },
+ { .compatible = "ti,tas5815" },
+ { .compatible = "ti,tas5822" },
{ .compatible = "ti,tas5825" },
{ .compatible = "ti,tas5827" },
+ { .compatible = "ti,tas5828" },
+ { .compatible = "ti,tas5830" },
{},
};
MODULE_DEVICE_TABLE(of, tasdevice_of_match);
@@ -145,7 +163,7 @@ MODULE_DEVICE_TABLE(of, tasdevice_of_match);
static int tas2781_digital_getvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
@@ -156,7 +174,7 @@ static int tas2781_digital_getvol(struct snd_kcontrol *kcontrol,
static int tas2781_digital_putvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
@@ -167,7 +185,7 @@ static int tas2781_digital_putvol(struct snd_kcontrol *kcontrol,
static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
@@ -178,7 +196,7 @@ static int tas2781_amp_getvol(struct snd_kcontrol *kcontrol,
static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv =
snd_soc_component_get_drvdata(codec);
struct soc_mixer_control *mc =
@@ -190,8 +208,7 @@ static int tas2781_amp_putvol(struct snd_kcontrol *kcontrol,
static int tasdev_force_fwload_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component =
- snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv =
snd_soc_component_get_drvdata(component);
@@ -205,8 +222,7 @@ static int tasdev_force_fwload_get(struct snd_kcontrol *kcontrol,
static int tasdev_force_fwload_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component =
- snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv =
snd_soc_component_get_drvdata(component);
bool change, val = (bool)ucontrol->value.integer.value[0];
@@ -226,7 +242,7 @@ static int tasdev_force_fwload_put(struct snd_kcontrol *kcontrol,
static int tasdev_cali_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp);
struct soc_bytes_ext *bytes_ext =
(struct soc_bytes_ext *) kcontrol->private_value;
@@ -463,7 +479,7 @@ static void sngl_calib_start(struct tasdevice_priv *tas_priv, int i,
static int tas2781_calib_start_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp);
struct soc_bytes_ext *bytes_ext =
(struct soc_bytes_ext *) kcontrol->private_value;
@@ -536,7 +552,7 @@ static int tas2563_calib_start_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct bulk_reg_val *q = (struct bulk_reg_val *)tas2563_cali_start_reg;
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
const int sum = ARRAY_SIZE(tas2563_cali_start_reg);
int i, j;
@@ -600,7 +616,7 @@ static void tas2563_calib_stop_put(struct tasdevice_priv *tas_priv)
static int tasdev_calib_stop_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp);
guard(mutex)(&priv->codec_lock);
@@ -615,7 +631,7 @@ static int tasdev_calib_stop_put(struct snd_kcontrol *kcontrol,
static int tasdev_cali_data_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp);
struct soc_bytes_ext *bytes_ext =
(struct soc_bytes_ext *) kcontrol->private_value;
@@ -662,7 +678,7 @@ static int tasdev_cali_data_put(struct snd_kcontrol *kcontrol,
static int tas2781_latch_reg_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
struct i2c_client *clt = (struct i2c_client *)tas_priv->client;
struct soc_bytes_ext *bytes_ext =
@@ -695,7 +711,7 @@ static int tas2781_latch_reg_get(struct snd_kcontrol *kcontrol,
static int tasdev_tf_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
struct soc_bytes_ext *bytes_ext =
(struct soc_bytes_ext *) kcontrol->private_value;
@@ -722,7 +738,7 @@ static int tasdev_tf_data_get(struct snd_kcontrol *kcontrol,
static int tasdev_re_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
struct soc_bytes_ext *bytes_ext =
(struct soc_bytes_ext *) kcontrol->private_value;
@@ -748,7 +764,7 @@ static int tasdev_re_data_get(struct snd_kcontrol *kcontrol,
static int tasdev_r0_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
struct calidata *cali_data = &tas_priv->cali_data;
struct soc_bytes_ext *bytes_ext =
@@ -771,7 +787,7 @@ static int tasdev_r0_data_get(struct snd_kcontrol *kcontrol,
static int tasdev_XMA1_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
struct tasdevice_fw *tas_fmw = tas_priv->fmw;
struct fct_param_address *p = &(tas_fmw->fct_par_addr);
@@ -791,7 +807,7 @@ static int tasdev_XMA1_data_get(struct snd_kcontrol *kcontrol,
static int tasdev_XMA2_data_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *comp = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(comp);
struct tasdevice_fw *tas_fmw = tas_priv->fmw;
struct fct_param_address *p = &(tas_fmw->fct_par_addr);
@@ -821,7 +837,7 @@ static int tasdevice_digital_gain_get(
{
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_dev = snd_soc_component_get_drvdata(codec);
unsigned int l = 0, r = mc->max;
unsigned int target, ar_mid, mid, ar_l, ar_r;
@@ -865,7 +881,7 @@ static int tasdevice_digital_gain_put(
{
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_dev = snd_soc_component_get_drvdata(codec);
int vol = ucontrol->value.integer.value[0];
int status = 0, max = mc->max, rc = 1;
@@ -967,7 +983,7 @@ static const struct snd_kcontrol_new tas2563_cali_controls[] = {
static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
int ret = 0;
@@ -984,7 +1000,7 @@ static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol,
static int tasdevice_info_active_num(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
@@ -1009,7 +1025,7 @@ static int tasdevice_info_chip_id(struct snd_kcontrol *kcontrol,
static int tasdevice_info_programs(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
struct tasdevice_fw *tas_fw = tas_priv->fmw;
@@ -1024,8 +1040,7 @@ static int tasdevice_info_programs(struct snd_kcontrol *kcontrol,
static int tasdevice_info_configurations(
struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
- struct snd_soc_component *codec =
- snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
struct tasdevice_fw *tas_fw = tas_priv->fmw;
@@ -1040,7 +1055,7 @@ static int tasdevice_info_configurations(
static int tasdevice_info_profile(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
@@ -1054,7 +1069,7 @@ static int tasdevice_info_profile(struct snd_kcontrol *kcontrol,
static int tasdevice_get_profile_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
ucontrol->value.integer.value[0] = tas_priv->rcabin.profile_cfg_id;
@@ -1065,7 +1080,7 @@ static int tasdevice_get_profile_id(struct snd_kcontrol *kcontrol,
static int tasdevice_get_chip_id(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
ucontrol->value.integer.value[0] = tas_priv->chip_id;
@@ -1111,7 +1126,7 @@ out:
static int tasdevice_program_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
ucontrol->value.integer.value[0] = tas_priv->cur_prog;
@@ -1122,7 +1137,7 @@ static int tasdevice_program_get(struct snd_kcontrol *kcontrol,
static int tasdevice_program_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
unsigned int nr_program = ucontrol->value.integer.value[0];
int ret = 0;
@@ -1139,7 +1154,7 @@ static int tasdevice_configuration_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
ucontrol->value.integer.value[0] = tas_priv->cur_conf;
@@ -1151,7 +1166,7 @@ static int tasdevice_configuration_put(
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
unsigned int nr_configuration = ucontrol->value.integer.value[0];
int ret = 0;
@@ -1167,7 +1182,7 @@ static int tasdevice_configuration_put(
static int tasdevice_active_num_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
struct i2c_client *clt = (struct i2c_client *)tas_priv->client;
struct tasdevice *tasdev = tas_priv->tasdevice;
@@ -1186,7 +1201,7 @@ static int tasdevice_active_num_get(struct snd_kcontrol *kcontrol,
static int tasdevice_active_num_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
int dev_id = ucontrol->value.integer.value[0];
int max = tas_priv->ndev - 1;
@@ -1385,7 +1400,7 @@ static int tasdevice_create_cali_ctrls(struct tasdevice_priv *priv)
/*
* Alloc kcontrol via devm_kzalloc(), which don't manually
- * free the kcontrol。
+ * free the kcontrol.
*/
cali_ctrls = devm_kcalloc(priv->dev, nctrls,
sizeof(cali_ctrls[0]), GFP_KERNEL);
@@ -1638,8 +1653,10 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
case TAS2118:
case TAS2120:
case TAS2320:
+ case TAS2568:
case TAS2570:
case TAS2572:
+ case TAS2574:
goto out;
}
if (tas_priv->name_prefix)
@@ -1665,8 +1682,8 @@ static void tasdevice_fw_ready(const struct firmware *fmw,
}
tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
- /* There is no calibration required for TAS5825/TAS5827. */
- if (tas_priv->chip_id < TAS5825) {
+ /* There is no calibration required for TAS58XX. */
+ if (tas_priv->chip_id < TAS5802) {
ret = tasdevice_create_cali_ctrls(tas_priv);
if (ret) {
dev_err(tas_priv->dev, "cali controls error\n");
@@ -1720,8 +1737,15 @@ out:
switch (tas_priv->chip_id) {
case TAS2563:
case TAS2781:
+ case TAS5802:
+ case TAS5806M:
+ case TAS5806MD:
+ case TAS5815:
+ case TAS5822:
case TAS5825:
case TAS5827:
+ case TAS5828:
+ case TAS5830:
/* If DSP FW fail, DSP kcontrol won't be created. */
tasdevice_dsp_remove(tas_priv);
}
@@ -1872,8 +1896,10 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec)
case TAS2118:
case TAS2120:
case TAS2320:
+ case TAS2568:
case TAS2570:
case TAS2572:
+ case TAS2574:
p = (struct snd_kcontrol_new *)tas2x20_snd_controls;
size = ARRAY_SIZE(tas2x20_snd_controls);
tas_priv->dvc_tlv_table = tas2x20_dvc_table;
@@ -1882,8 +1908,15 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec)
p = (struct snd_kcontrol_new *)tas2781_snd_controls;
size = ARRAY_SIZE(tas2781_snd_controls);
break;
+ case TAS5802:
+ case TAS5806M:
+ case TAS5806MD:
+ case TAS5815:
+ case TAS5822:
case TAS5825:
case TAS5827:
+ case TAS5828:
+ case TAS5830:
p = (struct snd_kcontrol_new *)tas5825_snd_controls;
size = ARRAY_SIZE(tas5825_snd_controls);
break;
@@ -1943,7 +1976,8 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
{
struct i2c_client *client = (struct i2c_client *)tas_priv->client;
unsigned int dev_addrs[TASDEVICE_MAX_CHANNELS];
- int i, ndev = 0;
+ int ndev = 0;
+ int i, rc;
if (tas_priv->isacpi) {
ndev = device_property_read_u32_array(&client->dev,
@@ -1954,8 +1988,12 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
} else {
ndev = (ndev < ARRAY_SIZE(dev_addrs))
? ndev : ARRAY_SIZE(dev_addrs);
- ndev = device_property_read_u32_array(&client->dev,
+ rc = device_property_read_u32_array(&client->dev,
"ti,audio-slots", dev_addrs, ndev);
+ if (rc != 0) {
+ ndev = 1;
+ dev_addrs[0] = client->addr;
+ }
}
tas_priv->irq =
@@ -1985,7 +2023,8 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
dev_err(tas_priv->dev, "%s Can't get reset GPIO\n",
__func__);
- strcpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name);
+ strscpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name,
+ sizeof(tas_priv->dev_name));
}
static int tasdevice_i2c_probe(struct i2c_client *i2c)
@@ -2051,11 +2090,20 @@ static const struct acpi_device_id tasdevice_acpi_match[] = {
{ "TXNW2120", TAS2120 },
{ "TXNW2320", TAS2320 },
{ "TXNW2563", TAS2563 },
+ { "TXNW2568", TAS2568 },
{ "TXNW2570", TAS2570 },
{ "TXNW2572", TAS2572 },
+ { "TXNW2574", TAS2574 },
{ "TXNW2781", TAS2781 },
+ { "TXNW5802", TAS5802 },
+ { "TXNW806M", TAS5806M },
+ { "TXNW806D", TAS5806MD },
+ { "TXNW5815", TAS5815 },
+ { "TXNW5822", TAS5822 },
{ "TXNW5825", TAS5825 },
{ "TXNW5827", TAS5827 },
+ { "TXNW5828", TAS5828 },
+ { "TXNW5830", TAS5830 },
{},
};