title: Which suspend/resume pointer is the right one to use?
body: <p>I am working on power management on an i2c driver and noticed something odd.</p>
  
  <p><code>include/linux/i2c.h</code></p>
  
  <pre><code>struct i2c_driver {
      //...
      int (*suspend)(struct i2c_client *, pm_message_t mesg);
      int (*resume)(struct i2c_client *);
      //...
      struct device_driver driver;
      //...
  }
  </code></pre>
  
  <p><code>include/linux/device.h</code></p>
  
  <pre><code>struct device_driver {
      //...
      int (*suspend) (struct device *dev, pm_message_t state);
      int (*resume) (struct device *dev);
      //...
      const struct dev_pm_ops *pm;
      //...
  }
  </code></pre>
  
  <p><code>include/linux/pm.h</code></p>
  
  <pre><code>struct dev_pm_ops {
      //...
      int (*suspend)(struct device *dev);
      int (*resume)(struct device *dev);
      //...
  }
  </code></pre>
  
  <p>Why are there so many suspend and resume function pointers?  Some kind of legacy thing?  Which one should I use for my driver?</p>
  
  <p>I am on an old kernel (2.6.35)</p>
  
  <p>Thanks!</p>