• Home
  • Raw
  • Download

Lines Matching +full:button +full:- +full:uid

1 // SPDX-License-Identifier: GPL-2.0-only
3 * sleep.c - ACPI sleep support.
7 * Copyright (c) 2000-2003 Patrick Mochel
28 * Some HW-full platforms do not have _S5, so they may need
70 return -EFAULT; in acpi_sleep_prepare()
182 DMI_MATCH(DMI_BOARD_NAME, "KN9 Series(NF-CK804)"),
189 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
195 .ident = "Asus Pundit P1-AH2 (M2N8L motherboard)",
203 .ident = "Panasonic CF51-2L",
207 DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"),
212 .ident = "Sony Vaio VGN-FW41E_H",
215 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW41E_H"),
220 .ident = "Sony Vaio VGN-FW21E",
223 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW21E"),
228 .ident = "Sony Vaio VGN-FW21M",
231 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW21M"),
244 .ident = "Sony Vaio VGN-SR11M",
247 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR11M"),
268 .ident = "Sony Vaio VGN-NW130D",
271 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-NW130D"),
284 .ident = "Averatec AV1020-ED2",
292 .ident = "Asus A8N-SLI DELUXE",
295 DMI_MATCH(DMI_BOARD_NAME, "A8N-SLI DELUXE"),
300 .ident = "Asus A8N-SLI Premium",
303 DMI_MATCH(DMI_BOARD_NAME, "A8N-SLI Premium"),
308 .ident = "Sony Vaio VGN-SR26GN_P",
311 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR26GN_P"),
324 .ident = "Sony Vaio VGN-FW520F",
327 DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW520F"),
356 * Lenovo G50-45 is a platform later than 2012, but needs nvs memory
361 .ident = "Lenovo G50-45",
369 .ident = "Lenovo G40-45",
376 * ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
422 * acpi_pm_freeze - Disable the GPEs and suspend EC transactions.
433 * acpi_pre_suspend - Enable wakeup devices, "freeze" EC and save NVS.
442 * __acpi_pm_prepare - Prepare the platform to enter the target state.
444 * If necessary, set the firmware waking vector and do arch-specific
457 * acpi_pm_prepare - Prepare the platform to enter the target sleep
470 * acpi_pm_finish - Instruct the platform to leave a sleep state.
498 /* If we were woken with the fixed power button, provide a small in acpi_pm_finish()
500 * button device (if it can be found). in acpi_pm_finish()
509 NULL, -1); in acpi_pm_finish()
511 pm_wakeup_event(&pwr_btn_adev->dev, 0); in acpi_pm_finish()
517 * acpi_pm_start - Start system PM transition.
527 * acpi_pm_end - Finish up system PM transition.
556 * acpi_suspend_begin - Set the target system sleep state to the state
570 return -ENOSYS; in acpi_suspend_begin()
580 * acpi_suspend_enter - Actually enter a sleep state.
583 * Flush caches and go to sleep. For STR we have to call arch-specific
604 return -ENOSYS; in acpi_suspend_enter()
608 pr_info(PREFIX "Low-level resume complete\n"); in acpi_suspend_enter()
652 return ACPI_SUCCESS(status) ? 0 : -EFAULT; in acpi_suspend_enter()
681 * acpi_suspend_begin_old - Set the target system sleep state to the
684 * pre-ACPI 2.0 suspend ordering has been requested.
696 * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
716 * low-power state in which certain types of activity are not desirable or that
725 #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66"
746 int uid; member
774 lpi_constraints_table = kcalloc(out_obj->package.count, in lpi_device_get_constraints()
782 for (i = 0; i < out_obj->package.count; i++) { in lpi_device_get_constraints()
785 union acpi_object *package = &out_obj->package.elements[i]; in lpi_device_get_constraints()
792 for (j = 0; j < package->package.count; ++j) { in lpi_device_get_constraints()
794 &(package->package.elements[j]); in lpi_device_get_constraints()
796 switch (element->type) { in lpi_device_get_constraints()
798 info.enabled = element->integer.value; in lpi_device_get_constraints()
801 info.name = element->string.pointer; in lpi_device_get_constraints()
804 package_count = element->package.count; in lpi_device_get_constraints()
805 info.package = element->package.elements; in lpi_device_get_constraints()
815 status = acpi_get_handle(NULL, info.name, &constraint->handle); in lpi_device_get_constraints()
822 constraint->min_dstate = -1; in lpi_device_get_constraints()
830 switch (info_obj->type) { in lpi_device_get_constraints()
835 if (info_obj->package.count < 2) in lpi_device_get_constraints()
838 cnstr_pkg = info_obj->package.elements; in lpi_device_get_constraints()
840 dev_info.uid = obj->integer.value; in lpi_device_get_constraints()
842 dev_info.min_dstate = obj->integer.value; in lpi_device_get_constraints()
845 "uid:%d min_dstate:%s\n", in lpi_device_get_constraints()
846 dev_info.uid, in lpi_device_get_constraints()
849 constraint->min_dstate = dev_info.min_dstate; in lpi_device_get_constraints()
854 if (constraint->min_dstate < 0) { in lpi_device_get_constraints()
883 acpi_power_state_string(adev->power.state)); in lpi_check_constraints()
885 if (!adev->flags.power_manageable) { in lpi_check_constraints()
891 if (adev->power.state < lpi_constraints_table[i].min_dstate) in lpi_check_constraints()
895 acpi_power_state_string(adev->power.state)); in lpi_check_constraints()
926 out_obj = acpi_evaluate_dsm(adev->handle, &lps0_dsm_guid, 1, 0, NULL); in lps0_device_attach()
927 if (!out_obj || out_obj->type != ACPI_TYPE_BUFFER) { in lps0_device_attach()
928 acpi_handle_debug(adev->handle, in lps0_device_attach()
933 lps0_dsm_func_mask = *(char *)out_obj->buffer.pointer; in lps0_device_attach()
937 acpi_handle_debug(adev->handle, "_DSM function mask: 0x%x\n", in lps0_device_attach()
940 lps0_device_handle = adev->handle; in lps0_device_attach()
945 * Use suspend-to-idle by default if the default suspend mode was not in lps0_device_attach()
952 * Some LPS0 systems, like ASUS Zenbook UX430UNR/i7-8550U, require the in lps0_device_attach()
954 * work, so mark it as wakeup-capable. in lps0_device_attach()
1035 /* Check non-EC GPE wakeups and dispatch the EC GPE. */ in acpi_s2idle_wake()
1037 pm_pr_dbg("ACPI non-EC GPE wakeup\n"); in acpi_s2idle_wake()
1045 * Note that if any non-EC GPEs are active at this point, the in acpi_s2idle_wake()
1082 * Drain pending events before restoring the working-state configuration in acpi_s2idle_restore()
1211 return ACPI_SUCCESS(status) ? 0 : -EFAULT; in acpi_hibernation_enter()
1225 if (facs && s4_hardware_signature != facs->hardware_signature) in acpi_hibernation_leave()
1252 * acpi_hibernation_begin_old - Set the target system sleep state to
1254 * function is used if the pre-ACPI 2.0 suspend ordering has been
1286 * The following callbacks are used if the pre-ACPI 2.0 suspend ordering has
1315 s4_hardware_signature = facs->hardware_signature; in acpi_sleep_hibernate_setup()