title: difference between struct i2c_driver vs struct platform_driver in linux kernel?
body: <p>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.</p>
  
  <p>In audio codec aic3101 module_i2c_driver is used for registering audio codec,</p>
  
  <p><a href="http://lxr.free-electrons.com/source/sound/soc/codecs/tlv320aic3x.c?v=3.14#L1613" rel="nofollow noreferrer">http://lxr.free-electrons.com/source/sound/soc/codecs/tlv320aic3x.c?v=3.14#L1613</a></p>
  
  <p>and whereas for ac97 module_platform_driver is used,</p>
  
  <p><a href="http://lxr.free-electrons.com/source/sound/soc/codecs/ac97.c?v=3.14#L149" rel="nofollow noreferrer">http://lxr.free-electrons.com/source/sound/soc/codecs/ac97.c?v=3.14#L149</a></p>
  
  <p>Both are i2c devices but they are register in two different way. Can anybody help me to understand why so.</p>
  
  <p>regards,
  GBiradar</p>