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
57 u16 year; /* 1900 - 9999 */
58 u8 month; /* 1 - 12 */
59 u8 day; /* 1 - 31 */
60 u8 hour; /* 0 - 23 */
61 u8 minute; /* 0 - 59 */
62 u8 second; /* 0 - 59 */
64 u16 msec; /* 1 - 1000 */
65 s16 tz; /* -1440 to 1440 or 2047 (unspecified) */
83 if (rt->year < 1900 || rt->year > 9999 || in acpi_tad_set_real_time()
84 rt->month < 1 || rt->month > 12 || in acpi_tad_set_real_time()
85 rt->hour > 23 || rt->minute > 59 || rt->second > 59 || in acpi_tad_set_real_time()
86 rt->tz < -1440 || (rt->tz > 1440 && rt->tz != 2047) || in acpi_tad_set_real_time()
87 rt->daylight > 3) in acpi_tad_set_real_time()
88 return -ERANGE; in acpi_tad_set_real_time()
100 return -EIO; in acpi_tad_set_real_time()
112 int ret = -EIO; in acpi_tad_get_real_time()
124 if (out_obj->type != ACPI_TYPE_BUFFER) in acpi_tad_get_real_time()
127 if (out_obj->buffer.length != sizeof(*rt)) in acpi_tad_get_real_time()
130 data = (struct acpi_tad_rt *)(out_obj->buffer.pointer); in acpi_tad_get_real_time()
131 if (!data->valid) in acpi_tad_get_real_time()
162 int val, ret = -ENODATA; in time_store()
166 return -ENOMEM; in time_store()
251 static int acpi_tad_wake_set(struct device *dev, char *method, u32 timer_id, in acpi_tad_wake_set() argument
271 status = acpi_evaluate_integer(handle, method, &arg_list, &retval); in acpi_tad_wake_set()
276 return -EIO; in acpi_tad_wake_set()
281 static int acpi_tad_wake_write(struct device *dev, const char *buf, char *method, in acpi_tad_wake_write() argument
295 return -EINVAL; in acpi_tad_wake_write()
298 return acpi_tad_wake_set(dev, method, timer_id, value); in acpi_tad_wake_write()
301 static ssize_t acpi_tad_wake_read(struct device *dev, char *buf, char *method, in acpi_tad_wake_read() argument
319 status = acpi_evaluate_integer(handle, method, &arg_list, &retval); in acpi_tad_wake_read()
324 return -EIO; in acpi_tad_wake_read()
380 return -EIO; in acpi_tad_clear_status()
394 return -EINVAL; in acpi_tad_status_write()
421 return -EIO; in acpi_tad_status_read()
431 return sprintf(buf, "0x%02X\n", dd->capabilities); in caps_show()
560 struct device *dev = &pdev->dev; in acpi_tad_remove()
568 if (dd->capabilities & ACPI_TAD_DC_WAKE) in acpi_tad_remove()
569 sysfs_remove_group(&dev->kobj, &acpi_tad_dc_attr_group); in acpi_tad_remove()
571 sysfs_remove_group(&dev->kobj, &acpi_tad_attr_group); in acpi_tad_remove()
575 if (dd->capabilities & ACPI_TAD_DC_WAKE) { in acpi_tad_remove()
587 struct device *dev = &pdev->dev; in acpi_tad_probe()
597 return -ENODEV; in acpi_tad_probe()
606 ret = -ENODEV; in acpi_tad_probe()
612 ret = -ENODEV; in acpi_tad_probe()
618 ret = -ENODEV; in acpi_tad_probe()
624 ret = -ENOMEM; in acpi_tad_probe()
628 dd->capabilities = caps; in acpi_tad_probe()
633 * simply enable system wakeup and runtime PM and put the device into in acpi_tad_probe()
648 ret = sysfs_create_group(&dev->kobj, &acpi_tad_attr_group); in acpi_tad_probe()
653 ret = sysfs_create_group(&dev->kobj, &acpi_tad_dc_attr_group); in acpi_tad_probe()
659 ret = sysfs_create_group(&dev->kobj, &acpi_tad_time_attr_group); in acpi_tad_probe()
683 .name = "acpi-tad",