lm.h 629 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. struct lm_device {
  3. struct device dev;
  4. struct resource resource;
  5. unsigned int irq;
  6. unsigned int id;
  7. };
  8. struct lm_driver {
  9. struct device_driver drv;
  10. int (*probe)(struct lm_device *);
  11. void (*remove)(struct lm_device *);
  12. int (*suspend)(struct lm_device *, pm_message_t);
  13. int (*resume)(struct lm_device *);
  14. };
  15. int lm_driver_register(struct lm_driver *drv);
  16. void lm_driver_unregister(struct lm_driver *drv);
  17. int lm_device_register(struct lm_device *dev);
  18. #define lm_get_drvdata(lm) dev_get_drvdata(&(lm)->dev)
  19. #define lm_set_drvdata(lm,d) dev_set_drvdata(&(lm)->dev, d)