On Wed, Feb 04, 2015 at 08:44:55PM +0800, Jie Yang wrote:
Some platforms, e.g. WSB, don't need irq handler and jack detection when system is in Suspend, for power save reason.
Here add irq enable/disable APIs and export them, also disable LDO1, which is used for jack detection when headphone is plugged in.
+int rt286_enable_irq(struct snd_soc_codec *codec) +{
This isn't a great idiom for the API - the machine driver isn't working with the interrupt, it's working with the jack detection so it should do the disable and reenable in terms of the jack detection too. Otherwise it's not clear that this won't interfere with other interrupt functions the device has and that it'll disable the jack detection hardware in the device rather than just ignoring the interrupt (which is presumably desired and appears to be actually happening in the code).