X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fpmu.h;h=ecce5912f4d6149254eaab42dee3b443e20354bb;hb=49d687b636c1f7e9a14faab7bd654f9fb88ecd11;hp=217d3daf73363e98cc5a9674470d080f41dcc16b;hpb=115b2ce1c3b974e43e45fa6c9e20cd7271a01dff;p=linux-2.6 diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 217d3daf73..5ad913ff02 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h @@ -6,7 +6,6 @@ * Copyright (C) 1998 Paul Mackerras. */ -#include #define PMU_DRIVER_VERSION 2 @@ -169,24 +168,16 @@ extern int pmu_get_model(void); struct pmu_sleep_notifier { - int (*notifier_call)(struct pmu_sleep_notifier *self, int when); + void (*notifier_call)(struct pmu_sleep_notifier *self, int when); int priority; struct list_head list; }; /* Code values for calling sleep/wakeup handlers - * - * Note: If a sleep request got cancelled, all drivers will get - * the PBOOK_SLEEP_REJECT, even those who didn't get the PBOOK_SLEEP_REQUEST. */ #define PBOOK_SLEEP_REQUEST 1 #define PBOOK_SLEEP_NOW 2 -#define PBOOK_SLEEP_REJECT 3 -#define PBOOK_WAKE 4 - -/* Result codes returned by the notifiers */ -#define PBOOK_SLEEP_OK 0 -#define PBOOK_SLEEP_REFUSE -1 +#define PBOOK_WAKE 3 /* priority levels in notifiers */ #define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ @@ -231,4 +222,15 @@ extern int pmu_battery_count; extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; extern unsigned int pmu_power_flags; +/* Backlight */ +extern void pmu_backlight_init(void); + +/* some code needs to know if the PMU was suspended for hibernation */ +#if defined(CONFIG_PM) && defined(CONFIG_PPC32) +extern int pmu_sys_suspended; +#else +/* if power management is not configured it can't be suspended */ +#define pmu_sys_suspended 0 +#endif + #endif /* __KERNEL__ */