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 ****************************************************************************/
15 #include <linux/kobject.h>
21 struct list_head drivers;
23 int (*shutdown)(struct sys_device *);
24 int (*suspend)(struct sys_device *, pm_message_t state);
25 int (*resume)(struct sys_device *);
29 struct sysdev_class_attribute {
30 struct attribute attr;
31 ssize_t (*show)(struct sysdev_class *, char *);
32 ssize_t (*store)(struct sysdev_class *, const char *, size_t);
35 #define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) struct sysdev_class_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
37 struct sysdev_driver {
38 struct list_head entry;
39 int (*add)(struct sys_device *);
40 int (*remove)(struct sys_device *);
41 int (*shutdown)(struct sys_device *);
42 int (*suspend)(struct sys_device *, pm_message_t state);
43 int (*resume)(struct sys_device *);
48 struct sysdev_class * cls;
52 struct sysdev_attribute {
53 struct attribute attr;
54 ssize_t (*show)(struct sys_device *, char *);
55 ssize_t (*store)(struct sys_device *, const char *, size_t);
58 #define SYSDEV_ATTR(_name,_mode,_show,_store) struct sysdev_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };