On Fri, Sep 10, 2010 at 02:23:31PM +0300, Jarkko Nikula wrote:
Mark, struct aic3x_disable_nb was created for getting pointer to aic3x easily. Probably same idea could be applied to wm8962 as well?
Probably. TBH I'd rather fix this in the notifier API - either way it's pretty nasty.
@@ -153,7 +161,7 @@ static int aic3x_write(struct snd_soc_codec *codec, unsigned int reg, data[1] = value & 0xff;
aic3x_write_reg_cache(codec, data[0], data[1]);
- if (!aic3x->power ||
- if (codec->cache_sync || codec->hw_write(codec->control_data, data, 2) == 2) return 0; else
This isn't the expected use of cache_sync, the idea is that it is a flag indicating that a cache sync is required - this will happen when writes are held while the regulators are disabled but the regualators haven't actually been powered down. This can be nice since we end up not needing to do I2C I/O during bulk configuration at startup, I'm hoping that we may be able to exploit this even more in the future.