Lines Matching +full:valid +full:- +full:wakeup +full:- +full:mask
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Support for power management features of the OLPC XO-1 laptop
16 #include <linux/olpc-ec.h>
21 #define DRV_NAME "olpc-xo1-pm"
33 /* Set bits in the wakeup mask */
40 /* Clear bits in the wakeup mask */
53 return -EINVAL; in xo1_power_state_enter()
56 * Save SCI mask (this gets lost since PM1_EN is used as a mask for in xo1_power_state_enter()
57 * wakeup events, which is not necessarily the same event set) in xo1_power_state_enter()
67 /* Restore SCI mask (using dword access to CS5536_PM1_EN) */ in xo1_power_state_enter()
77 /* Program wakeup mask (using dword access to CS5536_PM1_EN) */ in xo1_do_sleep()
92 printk(KERN_INFO "OLPC XO-1 power off sequence...\n"); in xo1_power_off()
110 /* suspend-to-RAM only */ in xo1_power_state_valid()
115 .valid = xo1_power_state_valid,
123 /* don't run on non-XOs */ in xo1_pm_probe()
125 return -ENODEV; in xo1_pm_probe()
129 dev_err(&pdev->dev, "can't fetch device resource info\n"); in xo1_pm_probe()
130 return -EIO; in xo1_pm_probe()
132 if (strcmp(pdev->name, "cs5535-pms") == 0) in xo1_pm_probe()
133 pms_base = res->start; in xo1_pm_probe()
134 else if (strcmp(pdev->name, "olpc-xo1-pm-acpi") == 0) in xo1_pm_probe()
135 acpi_base = res->start; in xo1_pm_probe()
141 printk(KERN_INFO "OLPC XO-1 support registered\n"); in xo1_pm_probe()
149 if (strcmp(pdev->name, "cs5535-pms") == 0) in xo1_pm_remove()
151 else if (strcmp(pdev->name, "olpc-xo1-pm-acpi") == 0) in xo1_pm_remove()
159 .name = "cs5535-pms",
167 .name = "olpc-xo1-pm-acpi",