Lines Matching +full:wakeup +full:- +full:method

1 // SPDX-License-Identifier: GPL-2.0
10 * It only supports the system wakeup capabilities of the TAD.
13 * allowing user space to manage the AC and DC wakeup timers of the TAD:
19 * The wakeup events handling and power management of the TAD is expected to
56 u16 year; /* 1900 - 9999 */
57 u8 month; /* 1 - 12 */
58 u8 day; /* 1 - 31 */
59 u8 hour; /* 0 - 23 */
60 u8 minute; /* 0 - 59 */
61 u8 second; /* 0 - 59 */
63 u16 msec; /* 1 - 1000 */
64 s16 tz; /* -1440 to 1440 or 2047 (unspecified) */
82 if (rt->year < 1900 || rt->year > 9999 || in acpi_tad_set_real_time()
83 rt->month < 1 || rt->month > 12 || in acpi_tad_set_real_time()
84 rt->hour > 23 || rt->minute > 59 || rt->second > 59 || in acpi_tad_set_real_time()
85 rt->tz < -1440 || (rt->tz > 1440 && rt->tz != 2047) || in acpi_tad_set_real_time()
86 rt->daylight > 3) in acpi_tad_set_real_time()
87 return -ERANGE; in acpi_tad_set_real_time()
99 return -EIO; in acpi_tad_set_real_time()
111 int ret = -EIO; in acpi_tad_get_real_time()
123 if (out_obj->type != ACPI_TYPE_BUFFER) in acpi_tad_get_real_time()
126 if (out_obj->buffer.length != sizeof(*rt)) in acpi_tad_get_real_time()
129 data = (struct acpi_tad_rt *)(out_obj->buffer.pointer); in acpi_tad_get_real_time()
130 if (!data->valid) in acpi_tad_get_real_time()
161 int val, ret = -ENODATA; in time_store()
165 return -ENOMEM; in time_store()
250 static int acpi_tad_wake_set(struct device *dev, char *method, u32 timer_id, in acpi_tad_wake_set() argument
270 status = acpi_evaluate_integer(handle, method, &arg_list, &retval); in acpi_tad_wake_set()
275 return -EIO; in acpi_tad_wake_set()
280 static int acpi_tad_wake_write(struct device *dev, const char *buf, char *method, in acpi_tad_wake_write() argument
294 return -EINVAL; in acpi_tad_wake_write()
297 return acpi_tad_wake_set(dev, method, timer_id, value); in acpi_tad_wake_write()
300 static ssize_t acpi_tad_wake_read(struct device *dev, char *buf, char *method, in acpi_tad_wake_read() argument
318 status = acpi_evaluate_integer(handle, method, &arg_list, &retval); in acpi_tad_wake_read()
323 return -EIO; in acpi_tad_wake_read()
379 return -EIO; in acpi_tad_clear_status()
393 return -EINVAL; in acpi_tad_status_write()
420 return -EIO; in acpi_tad_status_read()
430 return sprintf(buf, "0x%02X\n", dd->capabilities); in caps_show()
559 struct device *dev = &pdev->dev; in acpi_tad_remove()
566 if (dd->capabilities & ACPI_TAD_DC_WAKE) in acpi_tad_remove()
567 sysfs_remove_group(&dev->kobj, &acpi_tad_dc_attr_group); in acpi_tad_remove()
569 sysfs_remove_group(&dev->kobj, &acpi_tad_attr_group); in acpi_tad_remove()
573 if (dd->capabilities & ACPI_TAD_DC_WAKE) { in acpi_tad_remove()
585 struct device *dev = &pdev->dev; in acpi_tad_probe()
599 return -ENODEV; in acpi_tad_probe()
604 return -ENODEV; in acpi_tad_probe()
609 return -ENODEV; in acpi_tad_probe()
614 return -ENOMEM; in acpi_tad_probe()
616 dd->capabilities = caps; in acpi_tad_probe()
621 * simply enable system wakeup and runtime PM and put the device into in acpi_tad_probe()
636 ret = sysfs_create_group(&dev->kobj, &acpi_tad_attr_group); in acpi_tad_probe()
641 ret = sysfs_create_group(&dev->kobj, &acpi_tad_dc_attr_group); in acpi_tad_probe()
647 ret = sysfs_create_group(&dev->kobj, &acpi_tad_time_attr_group); in acpi_tad_probe()
666 .name = "acpi-tad",