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

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * HP PARISC soft power switch driver
5 * Copyright (c) 2001-2023 Helge Deller <deller@gmx.de>
8 * Support of the soft power switch button may be enabled or disabled at
9 * runtime through the "/proc/sys/kernel/power" procfs entry.
28 /* how often should the power button be polled ? */
31 /* how long does the power button needs to be down until we react ? */
64 /* wait until the button was pressed for 1 second */ in process_shutdown()
79 /* main power switch task struct */
82 /* filename in /proc which can be used to enable/disable the power switch */
83 #define SYSCTL_FILENAME "sys/kernel/power"
85 /* soft power switch enabled/disabled */
88 /* main kernel thread worker. It polls the button state */
104 * Non-Gecko-style machines: in kpowerswd()
105 * Check the power switch status which is read from the in kpowerswd()
107 * Bit 31 ("the lowest bit) is the status of the power switch. in kpowerswd()
108 * This bit is "1" if the button is NOT pressed. in kpowerswd()
114 * the power switch status is stored in Bit 0 ("the highest bit") in kpowerswd()
117 * the button has been released again. in kpowerswd()
156 * be executed any longer. This function then re-enables
157 * the soft-power switch and allows the user to switch off
165 /* re-enable the soft-power switch */ in parisc_panic_event()
175 /* qemu soft power-off function */
179 gsc_writel(0, (unsigned long) data->cb_data); in qemu_power_off()
194 /* enable the soft power switch if possible */ in power_init()
199 soft_power_reg = -1UL; in power_init()
202 case 0: printk(KERN_INFO DRIVER_NAME ": Gecko-style soft power switch enabled.\n"); in power_init()
205 case -1UL: printk(KERN_INFO DRIVER_NAME ": Soft power switch support not available.\n"); in power_init()
206 return -ENODEV; in power_init()
208 default: printk(KERN_INFO DRIVER_NAME ": Soft power switch at 0x%08lx enabled.\n", in power_init()
222 return -EIO; in power_init()
247 MODULE_DESCRIPTION("Soft power switch driver");