Skip to content

Commit be5db75

Browse files
Shenghao-Dingbroonie
authored andcommitted
ASoc: TAS2781: rename the tas2781_reset as tasdevice_reset
Rename the tas2781_reset as tasdevice_reset in case of misunderstanding. RESET register for both tas2563 and tas2781 is same and the use of reset pin is also same. Signed-off-by: Shenghao Ding <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 54e49a3 commit be5db75

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

include/sound/tas2781.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
44
//
5-
// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
5+
// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
66
// https://www.ti.com
77
//
88
// The TAS2563/TAS2781 driver implements a flexible and configurable
@@ -43,8 +43,8 @@
4343
(page * 128)) + reg)
4444

4545
/*Software Reset */
46-
#define TAS2781_REG_SWRESET TASDEVICE_REG(0x0, 0X0, 0x01)
47-
#define TAS2781_REG_SWRESET_RESET BIT(0)
46+
#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0X0, 0x01)
47+
#define TASDEVICE_REG_SWRESET_RESET BIT(0)
4848

4949
/*I2C Checksum */
5050
#define TASDEVICE_I2CChecksum TASDEVICE_REG(0x0, 0x0, 0x7E)
@@ -140,7 +140,7 @@ struct tasdevice_priv {
140140
void (*apply_calibration)(struct tasdevice_priv *tas_priv);
141141
};
142142

143-
void tas2781_reset(struct tasdevice_priv *tas_dev);
143+
void tasdevice_reset(struct tasdevice_priv *tas_dev);
144144
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
145145
struct module *module,
146146
void (*cont)(const struct firmware *fw, void *context));

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
834834
pm_runtime_set_active(tas_hda->dev);
835835
pm_runtime_enable(tas_hda->dev);
836836

837-
tas2781_reset(tas_hda->priv);
837+
tasdevice_reset(tas_hda->priv);
838838

839839
ret = component_add(tas_hda->dev, &tas2781_hda_comp_ops);
840840
if (ret) {
@@ -929,7 +929,7 @@ static int tas2781_system_resume(struct device *dev)
929929
tas_hda->priv->tasdevice[i].cur_prog = -1;
930930
tas_hda->priv->tasdevice[i].cur_conf = -1;
931931
}
932-
tas2781_reset(tas_hda->priv);
932+
tasdevice_reset(tas_hda->priv);
933933
tasdevice_prmg_load(tas_hda->priv, tas_hda->priv->cur_prog);
934934

935935
/* If calibrated data occurs error, dsp will still work with default

sound/soc/codecs/tas2781-comlib.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ struct tasdevice_priv *tasdevice_kzalloc(struct i2c_client *i2c)
243243
}
244244
EXPORT_SYMBOL_GPL(tasdevice_kzalloc);
245245

246-
void tas2781_reset(struct tasdevice_priv *tas_dev)
246+
void tasdevice_reset(struct tasdevice_priv *tas_dev)
247247
{
248248
int ret, i;
249249

@@ -254,8 +254,8 @@ void tas2781_reset(struct tasdevice_priv *tas_dev)
254254
} else {
255255
for (i = 0; i < tas_dev->ndev; i++) {
256256
ret = tasdevice_dev_write(tas_dev, i,
257-
TAS2781_REG_SWRESET,
258-
TAS2781_REG_SWRESET_RESET);
257+
TASDEVICE_REG_SWRESET,
258+
TASDEVICE_REG_SWRESET_RESET);
259259
if (ret < 0)
260260
dev_err(tas_dev->dev,
261261
"dev %d swreset fail, %d\n",
@@ -264,7 +264,7 @@ void tas2781_reset(struct tasdevice_priv *tas_dev)
264264
}
265265
usleep_range(1000, 1050);
266266
}
267-
EXPORT_SYMBOL_GPL(tas2781_reset);
267+
EXPORT_SYMBOL_GPL(tasdevice_reset);
268268

269269
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
270270
struct module *module,

sound/soc/codecs/tas2781-i2c.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ static int tasdevice_i2c_probe(struct i2c_client *i2c)
742742
if (ret)
743743
goto err;
744744

745+
tasdevice_reset(tas_priv);
746+
745747
ret = devm_snd_soc_register_component(tas_priv->dev,
746748
&soc_codec_driver_tasdevice,
747749
tasdevice_dai_driver, ARRAY_SIZE(tasdevice_dai_driver));

0 commit comments

Comments
 (0)