17 Jul
2008
17 Jul
'08
6:02 p.m.
Grant Likely wrote:
- aic26->codec.reg_cache_size = sizeof(aic26->reg_cache);
- aic26->codec.reg_cache = aic26->reg_cache;
...
- /* Register the sysfs files for debugging */
- /* Create SysFS files */
- rc = device_create_file(&spi->dev, &dev_attr_regs);
- rc |= device_create_file(&spi->dev, &dev_attr_regs_cache);
- rc |= device_create_file(&spi->dev, &dev_attr_keyclick);
- if (rc)
dev_info(&spi->dev, "error creating sysfs files\n");
I believe ASoC creates sysfs entries if you use reg_cache and reg_cache_size, so you should not be creating your own sysfs entries if you use these variables.
+#if defined(CONFIG_SND_SOC_OF)
- /* Tell the of_soc helper about this codec */
- of_snd_soc_register_codec(&aic26_soc_codec_dev, aic26, &aic26_dai,
spi->dev.archdata.of_node);
+#endif
I haven't paid any attention to the of_soc helper, because it's for ASoC V1 only. However, I don't understand why you need to reference it in the codec driver. My CS4270 codec driver knows nothing about OF and works fine in arch/powerpc.
--
Timur Tabi
Linux kernel developer at Freescale