blob: 937d90a8c5f3a59bbc198a023b32855f7fb76a31 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 ***
Ben Cheng94a85f62012-03-06 15:45:52 -080010 *** 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 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef _SYSDEV_H_
20#define _SYSDEV_H_
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#include <linux/kobject.h>
22#include <linux/pm.h>
Ben Cheng94a85f62012-03-06 15:45:52 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024struct sys_device;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025struct sysdev_class {
26 struct list_head drivers;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080027 int (*shutdown)(struct sys_device *);
Ben Cheng94a85f62012-03-06 15:45:52 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029 int (*suspend)(struct sys_device *, pm_message_t state);
30 int (*resume)(struct sys_device *);
31 struct kset kset;
32};
Ben Cheng94a85f62012-03-06 15:45:52 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034struct 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);
Ben Cheng94a85f62012-03-06 15:45:52 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080040#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) struct sysdev_class_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080041struct sysdev_driver {
42 struct list_head entry;
Ben Cheng94a85f62012-03-06 15:45:52 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044 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);
Ben Cheng94a85f62012-03-06 15:45:52 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049 int (*resume)(struct sys_device *);
50};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080051struct sys_device {
52 u32 id;
Ben Cheng94a85f62012-03-06 15:45:52 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054 struct sysdev_class * cls;
55 struct kobject kobj;
56};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080057struct sysdev_attribute {
Ben Cheng94a85f62012-03-06 15:45:52 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080059 struct attribute attr;
60 ssize_t (*show)(struct sys_device *, char *);
61 ssize_t (*store)(struct sys_device *, const char *, size_t);
62};
Ben Cheng94a85f62012-03-06 15:45:52 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080064#define SYSDEV_ATTR(_name,_mode,_show,_store) struct sysdev_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080065#endif