• Daniel Mack's avatar
    ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device · 15b5bdae
    Daniel Mack authored
    Power management for the cs4270 codec is currently implemented as part
    of the i2c_driver struct. The disadvantage of doing it this way is that
    the callbacks registered in the snd_soc_card struct are called _before_
    the codec's callbacks.
    
    That doesn't work, because the snd_soc_card callbacks will most likely
    switch down the codec's power domains or pull the reset GPIOs, and
    hence make the i2c communication bail out.
    
    Fix this by binding the suspend and resume code to the
    snd_soc_codec_device driver model and let the I2C functions only call
    the SoC core function for resume and suspend, which do nothing currently
    but will do later.
    Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
    Cc: Timur Tabi <timur@freescale.com>
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    15b5bdae
cs4270.c 26.7 KB