I'm trying to understand audio codec, while going through different audio codec source code i came across register of codec in two different ways struct platform_driver and struct i2c_driver.
In audio codec aic3101 module_i2c_driver is used for registering audio codec,
http://lxr.free-electrons.com/source/sound/soc/codecs/tlv320aic3x.c?v=3.14#L1613
and whereas for ac97 module_platform_driver is used,
http://lxr.free-electrons.com/source/sound/soc/codecs/ac97.c?v=3.14#L149
Both are i2c devices but they are register in two different way. Can anybody help me to understand why so.
regards, GBiradar