Home | History | Annotate | Download | only in linux
      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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _LINUX_ANDROID_POWER_H
     13 #define _LINUX_ANDROID_POWER_H
     14 
     15 #include <linux/list.h>
     16 
     17 typedef struct
     18 {
     19  struct list_head link;
     20  int lock_count;
     21  int flags;
     22  const char *name;
     23  int expires;
     24 } android_suspend_lock_t;
     25 
     26 #define ANDROID_SUSPEND_LOCK_FLAG_COUNTED (1U << 0)
     27 #define ANDROID_SUSPEND_LOCK_FLAG_USER_READABLE (1U << 1)
     28 #define ANDROID_SUSPEND_LOCK_FLAG_USER_SET (1U << 2)
     29 #define ANDROID_SUSPEND_LOCK_FLAG_USER_CLEAR (1U << 3)
     30 #define ANDROID_SUSPEND_LOCK_FLAG_USER_INC (1U << 4)
     31 #define ANDROID_SUSPEND_LOCK_FLAG_USER_DEC (1U << 5)
     32 #define ANDROID_SUSPEND_LOCK_FLAG_USER_VISIBLE_MASK (0x1fU << 1)
     33 #define ANDROID_SUSPEND_LOCK_AUTO_EXPIRE (1U << 6)
     34 
     35 typedef struct android_early_suspend android_early_suspend_t;
     36 struct android_early_suspend
     37 {
     38  struct list_head link;
     39  int level;
     40  void (*suspend)(android_early_suspend_t *h);
     41  void (*resume)(android_early_suspend_t *h);
     42 };
     43 
     44 typedef enum {
     45  ANDROID_CHARGING_STATE_UNKNOWN,
     46  ANDROID_CHARGING_STATE_DISCHARGE,
     47  ANDROID_CHARGING_STATE_MAINTAIN,
     48  ANDROID_CHARGING_STATE_SLOW,
     49  ANDROID_CHARGING_STATE_NORMAL,
     50  ANDROID_CHARGING_STATE_FAST,
     51  ANDROID_CHARGING_STATE_OVERHEAT
     52 } android_charging_state_t;
     53 
     54 #endif
     55 
     56