1 /**************************************************************************** 2 **************************************************************************** 3 *** 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. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _SYSDEV_H_ 20 #define _SYSDEV_H_ 21 #include <linux/kobject.h> 22 #include <linux/pm.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 struct sys_device; 25 struct sysdev_class { 26 struct list_head drivers; 27 int (*shutdown)(struct sys_device *); 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 int (*suspend)(struct sys_device *, pm_message_t state); 30 int (*resume)(struct sys_device *); 31 struct kset kset; 32 }; 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 struct sysdev_class_attribute { 35 struct attribute attr; 36 ssize_t (*show)(struct sysdev_class *, char *); 37 ssize_t (*store)(struct sysdev_class *, const char *, size_t); 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 }; 40 #define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) struct sysdev_class_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, }; 41 struct sysdev_driver { 42 struct list_head entry; 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 int (*add)(struct sys_device *); 45 int (*remove)(struct sys_device *); 46 int (*shutdown)(struct sys_device *); 47 int (*suspend)(struct sys_device *, pm_message_t state); 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 int (*resume)(struct sys_device *); 50 }; 51 struct sys_device { 52 u32 id; 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 struct sysdev_class * cls; 55 struct kobject kobj; 56 }; 57 struct sysdev_attribute { 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 struct attribute attr; 60 ssize_t (*show)(struct sys_device *, char *); 61 ssize_t (*store)(struct sys_device *, const char *, size_t); 62 }; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define SYSDEV_ATTR(_name,_mode,_show,_store) struct sysdev_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, }; 65 #endif 66