of_device.h 897 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _ASM_POWERPC_OF_DEVICE_H
  2. #define _ASM_POWERPC_OF_DEVICE_H
  3. #ifdef __KERNEL__
  4. #include <linux/device.h>
  5. #include <linux/of.h>
  6. /*
  7. * The of_device is a kind of "base class" that is a superset of
  8. * struct device for use by devices attached to an OF node and
  9. * probed using OF properties.
  10. */
  11. struct of_device
  12. {
  13. struct device_node *node; /* to be obsoleted */
  14. u64 dma_mask; /* DMA mask */
  15. struct device dev; /* Generic device interface */
  16. };
  17. extern struct of_device *of_device_alloc(struct device_node *np,
  18. const char *bus_id,
  19. struct device *parent);
  20. extern ssize_t of_device_get_modalias(struct of_device *ofdev,
  21. char *str, ssize_t len);
  22. extern int of_device_uevent(struct device *dev,
  23. struct kobj_uevent_env *env);
  24. /* This is just here during the transition */
  25. #include <linux/of_device.h>
  26. #endif /* __KERNEL__ */
  27. #endif /* _ASM_POWERPC_OF_DEVICE_H */