ASoC: Make cache status available via debugfs
Could just as well live in sysfs but sysfs doesn't have the simple value export helpers debugfs does. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
6f8ab4ac29
commit
aaee8ef146
|
@ -493,14 +493,14 @@ struct snd_soc_codec {
|
||||||
struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
|
struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
|
||||||
unsigned int active;
|
unsigned int active;
|
||||||
unsigned int cache_bypass:1; /* Suppress access to the cache */
|
unsigned int cache_bypass:1; /* Suppress access to the cache */
|
||||||
unsigned int cache_only:1; /* Suppress writes to hardware */
|
|
||||||
unsigned int cache_sync:1; /* Cache needs to be synced to hardware */
|
|
||||||
unsigned int suspended:1; /* Codec is in suspend PM state */
|
unsigned int suspended:1; /* Codec is in suspend PM state */
|
||||||
unsigned int probed:1; /* Codec has been probed */
|
unsigned int probed:1; /* Codec has been probed */
|
||||||
unsigned int ac97_registered:1; /* Codec has been AC97 registered */
|
unsigned int ac97_registered:1; /* Codec has been AC97 registered */
|
||||||
unsigned int ac97_created:1; /* Codec has been created by SoC */
|
unsigned int ac97_created:1; /* Codec has been created by SoC */
|
||||||
unsigned int sysfs_registered:1; /* codec has been sysfs registered */
|
unsigned int sysfs_registered:1; /* codec has been sysfs registered */
|
||||||
unsigned int cache_init:1; /* codec cache has been initialized */
|
unsigned int cache_init:1; /* codec cache has been initialized */
|
||||||
|
u32 cache_only; /* Suppress writes to hardware */
|
||||||
|
u32 cache_sync; /* Cache needs to be synced to hardware */
|
||||||
|
|
||||||
/* codec IO */
|
/* codec IO */
|
||||||
void *control_data; /* codec control (i2c/3wire) data */
|
void *control_data; /* codec control (i2c/3wire) data */
|
||||||
|
|
|
@ -235,6 +235,11 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debugfs_create_bool("cache_sync", 0444, codec->debugfs_codec_root,
|
||||||
|
&codec->cache_sync);
|
||||||
|
debugfs_create_bool("cache_only", 0444, codec->debugfs_codec_root,
|
||||||
|
&codec->cache_only);
|
||||||
|
|
||||||
codec->debugfs_reg = debugfs_create_file("codec_reg", 0644,
|
codec->debugfs_reg = debugfs_create_file("codec_reg", 0644,
|
||||||
codec->debugfs_codec_root,
|
codec->debugfs_codec_root,
|
||||||
codec, &codec_reg_fops);
|
codec, &codec_reg_fops);
|
||||||
|
|
Loading…
Reference in New Issue