• Home
  • Raw
  • Download

Lines Matching +full:power +full:- +full:button

2  * linux/drivers/parisc/power.c
3 * HP PARISC soft power switch support driver
5 * Copyright (c) 2001-2007 Helge Deller <deller@gmx.de>
33 * Support of the soft power switch button may be enabled or disabled at
34 * runtime through the "/proc/sys/kernel/power" procfs entry.
53 /* how often should the power button be polled ? */
56 /* how long does the power button needs to be down until we react ? */
89 /* wait until the button was pressed for 1 second */ in process_shutdown()
104 /* main power switch task struct */
107 /* filename in /proc which can be used to enable/disable the power switch */
108 #define SYSCTL_FILENAME "sys/kernel/power"
110 /* soft power switch enabled/disabled */
113 /* main kernel thread worker. It polls the button state */
129 * Non-Gecko-style machines: in kpowerswd()
130 * Check the power switch status which is read from the in kpowerswd()
132 * Bit 31 ("the lowest bit) is the status of the power switch. in kpowerswd()
133 * This bit is "1" if the button is NOT pressed. in kpowerswd()
139 * the power switch status is stored in Bit 0 ("the highest bit") in kpowerswd()
142 * the button has been released again. in kpowerswd()
179 * executed any longer. This function then re-enables the
180 * soft-power switch and allows the user to switch off the system
185 /* re-enable the soft-power switch */ in parisc_panic_event()
206 /* enable the soft power switch if possible */ in power_init()
211 soft_power_reg = -1UL; in power_init()
214 case 0: printk(KERN_INFO DRIVER_NAME ": Gecko-style soft power switch enabled.\n"); in power_init()
217 case -1UL: printk(KERN_INFO DRIVER_NAME ": Soft power switch support not available.\n"); in power_init()
218 return -ENODEV; in power_init()
220 default: printk(KERN_INFO DRIVER_NAME ": Soft power switch at 0x%08lx enabled.\n", in power_init()
228 return -EIO; in power_init()
253 MODULE_DESCRIPTION("Soft power switch driver");