• Javier Martinez Canillas's avatar
    ASoC: rt5677: Add OF device ID table · 7b87463e
    Javier Martinez Canillas authored
    The driver doesn't have a struct of_device_id table but supported devices
    are registered via Device Trees. This is working on the assumption that a
    I2C device registered via OF will always match a legacy I2C device ID and
    that the MODALIAS reported will always be of the form i2c:<device>.
    
    But this could change in the future so the correct approach is to have an
    OF device ID table if the devices are registered via OF.
    
    Before this patch:
    
    $ modinfo sound/soc/codecs/snd-soc-rt5677.ko | grep alias
    alias:          i2c:RT5677CE:00
    alias:          i2c:rt5676
    alias:          i2c:rt5677
    
    After this patch:
    
    $ modinfo sound/soc/codecs/snd-soc-rt5677.ko | grep alias
    alias:          of:N*T*Crealtek,rt5677C*
    alias:          of:N*T*Crealtek,rt5677
    alias:          i2c:RT5677CE:00
    alias:          i2c:rt5676
    alias:          i2c:rt5677
    Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    7b87463e
rt5677.c 170 KB