Thread (46 messages) flat view 46 messages, 7 authors, 2008-07-18

Re: [PATCH v2 3/3] ALSA SoC: Add Texas Instruments TLV320AIC26 codec driver

From: Timur Tabi <hidden>
Date: 2008-07-17 16:02:26
Also in: alsa-devel

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help