ASoC: soc-core: Remove display_register() callback
PATCH 1/1 ASoC: soc-core: Remove display_register() callback
Remove the display_register() callback as there are no users of it in the upstream kernel and makes it difficult to unify the format of the codec_reg file.
--- include/sound/soc.h | 2 -- sound/soc/soc-core.c | 31 +++++++++++++------------------ 2 files changed, 13 insertions(+), 20 deletions(-)
include/sound/soc.h +0 -2
@@ -536,8 +536,6 @@ struct snd_soc_codec_driver {/* codec IO */ unsigned int (*read)(struct snd_soc_codec *,unsigned int );int (*write)(struct snd_soc_codec *,unsigned int ,unsigned int ); -int (*display_register)(struct snd_soc_codec *,char *, -size_t ,unsigned int );int (*volatile_register)(struct snd_soc_codec *,unsigned int );int (*readable_register)(struct snd_soc_codec *,unsigned int );short reg_cache_size;
sound/soc/soc-core.c +13 -18
@@ -110,24 +110,19 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf)if (count >=PAGE_SIZE -1 )break ; -if (codec->driver->display_register) { - count += codec->driver->display_register (codec, buf + count, -PAGE_SIZE - count, i); - }else { -/* If the read fails it's almost certainly due to -* the register being volatile and the device being -* powered off. -*/ - ret =snd_soc_read (codec, i); -if (ret >=0 ) - count +=snprintf (buf + count, -PAGE_SIZE - count, -"%.*x" , wordsize, ret); -else - count +=snprintf (buf + count, -PAGE_SIZE - count, -"<no data: %d>" , ret); - } +/* If the read fails it's almost certainly due to +* the register being volatile and the device being +* powered off. +*/ + ret =snd_soc_read (codec, i); +if (ret >=0 ) + count +=snprintf (buf + count, +PAGE_SIZE - count, +"%.*x" , wordsize, ret); +else + count +=snprintf (buf + count, +PAGE_SIZE - count, +"<no data: %d>" , ret);if (count >=PAGE_SIZE -1 )break ;
Signature · 1 line
1.7.3.5
Quoted 5 lines · Dimitris Papastamos
Remove the
display_register()callback as there are no users of it in the upstream kernel and makes it difficult to unify the format of thecodec_regfile.Signed-off-by Dimitris Papastamos <[email protected]>
This was rather strongly requested for some devices with extremely large registers (128 bits at least IIRC) which may eventually make it to mainline. It seems better to just have some sort of fallback for those devices, if it causes output problems people can always fix those.
Quoted 5 lines · Mark Brown
Quoted 3 lines · Dimitris Papastamos
Remove the
display_register()callback as there are no users of it in the upstream kernel and makes it difficult to unify the format of thecodec_regfile.
Quoted 7 lines
Quoted 1 line
Signed-off-by Dimitris Papastamos <[email protected]>This was rather strongly requested for some devices with extremely large registers (128 bits at least IIRC) which may eventually make it to mainline. It seems better to just have some sort of fallback for those devices, if it causes output problems people can always fix those.
TI Codec devices have two problems:
1) large registers - up to 128 bits
2) sparse register maps - big gaps between valid register addresses.
Signature · 2 lines
Jon Smirl [email protected]
Quoted 3 lines · On Wed, Feb 02, 2011 at 09:50:40AM -0500, [email protected] wrote:
TI Codec devices have two problems:
1) large registers - up to 128 bits
2) sparse register maps - big gaps between valid register addresses.
The sparse register maps are already very well handled, they're quite widespread.
Quoted 15 lines · On Wed, 2011-02-02 at 09:50 -0500, [email protected] wrote:
Quoted 5 lines · Mark Brown
Quoted 3 lines · Dimitris Papastamos
Remove the
display_register()callback as there are no users of it in the upstream kernel and makes it difficult to unify the format of thecodec_regfile.Quoted 7 lines
Quoted 1 line
Signed-off-by Dimitris Papastamos <[email protected]>This was rather strongly requested for some devices with extremely large registers (128 bits at least IIRC) which may eventually make it to mainline. It seems better to just have some sort of fallback for those devices, if it causes output problems people can always fix those.
Quoted 3 lines
TI Codec devices have two problems:
1) large registers - up to 128 bits
2) sparse register maps - big gaps between valid register addresses.
Yes, I've dropped the patch.
Thanks,
Dimitris