Skip to content

Commit 37c42bd

Browse files
Dr. David Alan Gilbertbroonie
authored andcommitted
ASoC: rt715: Remove unused hda_to_sdw
hda_to_sdw() has been unused since it was added in 2020 as part of the commit d1ede06 ("ASoC: rt715: add RT715 codec driver") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241216135110.53426-1-linux@treblig.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5725bce commit 37c42bd

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

sound/soc/codecs/rt715-sdw.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -372,47 +372,6 @@ static const struct regmap_config rt715_sdw_regmap = {
372372
.use_single_write = true,
373373
};
374374

375-
int hda_to_sdw(unsigned int nid, unsigned int verb, unsigned int payload,
376-
unsigned int *sdw_addr_h, unsigned int *sdw_data_h,
377-
unsigned int *sdw_addr_l, unsigned int *sdw_data_l)
378-
{
379-
unsigned int offset_h, offset_l, e_verb;
380-
381-
if (((verb & 0xff) != 0) || verb == 0xf00) { /* 12 bits command */
382-
if (verb == 0x7ff) /* special case */
383-
offset_h = 0;
384-
else
385-
offset_h = 0x3000;
386-
387-
if (verb & 0x800) /* get command */
388-
e_verb = (verb - 0xf00) | 0x80;
389-
else /* set command */
390-
e_verb = (verb - 0x700);
391-
392-
*sdw_data_h = payload; /* 7 bits payload */
393-
*sdw_addr_l = *sdw_data_l = 0;
394-
} else { /* 4 bits command */
395-
if ((verb & 0x800) == 0x800) { /* read */
396-
offset_h = 0x9000;
397-
offset_l = 0xa000;
398-
} else { /* write */
399-
offset_h = 0x7000;
400-
offset_l = 0x8000;
401-
}
402-
e_verb = verb >> 8;
403-
*sdw_data_h = (payload >> 8); /* 16 bits payload [15:8] */
404-
*sdw_addr_l = (e_verb << 8) | nid | 0x80; /* 0x80: valid bit */
405-
*sdw_addr_l += offset_l;
406-
*sdw_data_l = payload & 0xff;
407-
}
408-
409-
*sdw_addr_h = (e_verb << 8) | nid;
410-
*sdw_addr_h += offset_h;
411-
412-
return 0;
413-
}
414-
EXPORT_SYMBOL(hda_to_sdw);
415-
416375
static int rt715_update_status(struct sdw_slave *slave,
417376
enum sdw_slave_status status)
418377
{

sound/soc/codecs/rt715.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,5 @@ int rt715_io_init(struct device *dev, struct sdw_slave *slave);
220220
int rt715_init(struct device *dev, struct regmap *sdw_regmap,
221221
struct regmap *regmap, struct sdw_slave *slave);
222222

223-
int hda_to_sdw(unsigned int nid, unsigned int verb, unsigned int payload,
224-
unsigned int *sdw_addr_h, unsigned int *sdw_data_h,
225-
unsigned int *sdw_addr_l, unsigned int *sdw_data_l);
226223
int rt715_clock_config(struct device *dev);
227224
#endif /* __RT715_H__ */

0 commit comments

Comments
 (0)