Skip to contentSkip to conversation

ASoC: codec register dump in debugfs

DISCUSSION Sergej Sawazki 2 participants 2 messages May 29, 2015

lore
Share & tools
lore
#0 lore raw

Dear all,

please correct me if I am wrong. Since the codec drivers have been converted to direct regmap API usage, it is not common to set the following snd_soc_codec_driver struct members:

.reg_cache_size
.reg_word_size

However, the functions soc_codec_reg_show() and format_register_str() (responsible for formating and printing the codec register dumps to debugfs) depend on these members.

I'm writing a ASoC machine driver. The board has two wm8741 codecs. I would like to see the codec register dumps in debugfs.

eg:
cat /sys/kernel/debug/asoc/<card_name>/codec\:wm8741.1-001a/codec_reg cat /sys/kernel/debug/asoc/<card_name>/codec\:wm8741.1-001b/codec_reg

Is it OK to set the above mentioned members in a codec driver to "enable" the register dump output?
Or should we refactor the above mentioned functions to use the regmap API?
Or am I missing something?

Thanks,
Sergej

#1 lore raw
Quoted 2 lines · Sergej Sawazki

I'm writing a ASoC machine driver. The board has two wm8741 codecs. I would like to see the codec register dumps in debugfs.

Use the regmap debugfs interface for devices that use regmap. The ASoC level one will be removed once all drivers are converted to regmap.