1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _PLATFORM_DEVICE_H_
13 #define _PLATFORM_DEVICE_H_
15 #include <linux/device.h>
17 struct platform_device {
22 struct resource * resource;
25 #define to_platform_device(x) container_of((x), struct platform_device, dev)
27 struct platform_driver {
28 int (*probe)(struct platform_device *);
29 int (*remove)(struct platform_device *);
30 void (*shutdown)(struct platform_device *);
31 int (*suspend)(struct platform_device *, pm_message_t state);
32 int (*resume)(struct platform_device *);
33 struct device_driver driver;
36 #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
37 #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))