Lines Matching +full:device +full:- +full:handle
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * acpi.h - ACPI Interface
15 #include <linux/device.h>
40 return adev ? adev->handle : NULL; in acpi_device_handle()
43 #define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode)
72 * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with
73 * the PCI-defined class-code information
75 * @_cls : the class, subclass, prog-if triple for this device
76 * @_msk : the class mask for this device
84 static inline bool has_acpi_companion(struct device *dev) in has_acpi_companion()
86 return is_acpi_device_node(dev->fwnode); in has_acpi_companion()
89 static inline void acpi_preset_companion(struct device *dev, in acpi_preset_companion()
97 return dev_name(&adev->dev); in acpi_dev_name()
100 struct device *acpi_get_first_physical_node(struct acpi_device *adev);
172 return -ENODEV; in acpi_debugger_init()
178 return -ENODEV; in acpi_register_debugger()
188 return -ENODEV; in acpi_debugger_create_thread()
193 return -ENODEV; in acpi_debugger_write_log()
198 return -ENODEV; in acpi_debugger_read_cmd()
203 return -ENODEV; in acpi_debugger_wait_command_ready()
208 return -ENODEV; in acpi_debugger_notify_command_complete()
214 ((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
249 /* the following numa functions are architecture-dependent */
263 void acpi_arch_dma_setup(struct device *dev, u64 *dma_addr, u64 *dma_size);
268 acpi_arch_dma_setup(struct device *dev, u64 *dma_addr, u64 *dma_size) { } in acpi_arch_dma_setup()
275 #define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)
295 int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu,
299 static inline int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu, in acpi_processor_evaluate_cst() argument
302 return -ENODEV; in acpi_processor_evaluate_cst()
308 int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, u32 acpi_id,
314 int acpi_get_ioapic_id(acpi_handle handle, u32 gsi_base, u64 *phys_addr);
317 int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
318 int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
319 int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base);
325 #define INVALID_ACPI_IRQ ((unsigned)-1)
334 int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity);
352 return -1; in acpi_get_override_irq()
421 extern long acpi_is_video_device(acpi_handle handle);
428 int acpi_get_node(acpi_handle handle);
431 * pxm_to_online_node - Map proximity ID to online node
438 * ACPI device drivers, which are called after the NUMA initialization has
439 * completed in the kernel, can call this interface to obtain their device
459 static inline int acpi_get_node(acpi_handle handle) in acpi_get_node() argument
468 #define PXM_INVAL (-1)
503 acpi_status acpi_release_memory(acpi_handle handle, struct resource *res,
531 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
533 /* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */
545 /* Platform-Wide Capabilities _OSC: Capabilities DWORD 2: Support Field */
667 const struct device *dev);
669 const void *acpi_device_get_match_data(const struct device *dev);
670 extern bool acpi_driver_match_device(struct device *dev,
672 int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
673 int acpi_device_modalias(struct device *, char *, int);
681 adev->flags.visited = true; in acpi_device_set_enumerated()
686 adev->flags.visited = false; in acpi_device_clear_enumerated()
717 int acpi_get_local_address(acpi_handle handle, u32 *addr);
800 static inline bool has_acpi_companion(struct device *dev) in has_acpi_companion()
805 static inline void acpi_preset_companion(struct device *dev, in acpi_preset_companion()
815 static inline struct device *acpi_get_first_physical_node(struct acpi_device *adev) in acpi_get_first_physical_node()
860 return -ENODEV; in acpi_table_parse()
877 const struct acpi_device_id *ids, const struct device *dev) in acpi_match_device()
882 static inline const void *acpi_device_get_match_data(const struct device *dev) in acpi_device_get_match_data()
887 static inline bool acpi_driver_match_device(struct device *dev, in acpi_driver_match_device()
893 static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, in acpi_evaluate_dsm() argument
901 static inline int acpi_device_uevent_modalias(struct device *dev, in acpi_device_uevent_modalias()
904 return -ENODEV; in acpi_device_uevent_modalias()
907 static inline int acpi_device_modalias(struct device *dev, in acpi_device_modalias()
910 return -ENODEV; in acpi_device_modalias()
930 static inline int acpi_dma_get_range(struct device *dev, u64 *dma_addr, in acpi_dma_get_range()
933 return -ENODEV; in acpi_dma_get_range()
936 static inline int acpi_dma_configure(struct device *dev, in acpi_dma_configure()
942 static inline int acpi_dma_configure_id(struct device *dev, in acpi_dma_configure_id()
961 return -EINVAL; in acpi_reconfig_notifier_register()
966 return -EINVAL; in acpi_reconfig_notifier_unregister()
974 static inline int acpi_get_local_address(acpi_handle handle, u32 *addr) in acpi_get_local_address() argument
976 return -ENODEV; in acpi_get_local_address()
1013 int acpi_dev_suspend(struct device *dev, bool wakeup);
1014 int acpi_dev_resume(struct device *dev);
1015 int acpi_subsys_runtime_suspend(struct device *dev);
1016 int acpi_subsys_runtime_resume(struct device *dev);
1017 int acpi_dev_pm_attach(struct device *dev, bool power_on);
1018 bool acpi_storage_d3(struct device *dev);
1020 static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } in acpi_subsys_runtime_suspend()
1021 static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } in acpi_subsys_runtime_resume()
1022 static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) in acpi_dev_pm_attach()
1026 static inline bool acpi_storage_d3(struct device *dev) in acpi_storage_d3()
1033 int acpi_subsys_prepare(struct device *dev);
1034 void acpi_subsys_complete(struct device *dev);
1035 int acpi_subsys_suspend_late(struct device *dev);
1036 int acpi_subsys_suspend_noirq(struct device *dev);
1037 int acpi_subsys_suspend(struct device *dev);
1038 int acpi_subsys_freeze(struct device *dev);
1039 int acpi_subsys_poweroff(struct device *dev);
1043 static inline int acpi_subsys_prepare(struct device *dev) { return 0; } in acpi_subsys_prepare()
1044 static inline void acpi_subsys_complete(struct device *dev) {} in acpi_subsys_complete()
1045 static inline int acpi_subsys_suspend_late(struct device *dev) { return 0; } in acpi_subsys_suspend_late()
1046 static inline int acpi_subsys_suspend_noirq(struct device *dev) { return 0; } in acpi_subsys_suspend_noirq()
1047 static inline int acpi_subsys_suspend(struct device *dev) { return 0; } in acpi_subsys_suspend()
1048 static inline int acpi_subsys_freeze(struct device *dev) { return 0; } in acpi_subsys_freeze()
1049 static inline int acpi_subsys_poweroff(struct device *dev) { return 0; } in acpi_subsys_poweroff()
1056 void acpi_handle_printk(const char *level, acpi_handle handle,
1058 void acpi_evaluation_failure_warn(acpi_handle handle, const char *name,
1062 acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {} in acpi_handle_printk() argument
1063 static inline void acpi_evaluation_failure_warn(acpi_handle handle, in acpi_evaluation_failure_warn() argument
1070 void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...);
1079 #define acpi_handle_emerg(handle, fmt, ...) \ argument
1080 acpi_handle_printk(KERN_EMERG, handle, fmt, ##__VA_ARGS__)
1081 #define acpi_handle_alert(handle, fmt, ...) \ argument
1082 acpi_handle_printk(KERN_ALERT, handle, fmt, ##__VA_ARGS__)
1083 #define acpi_handle_crit(handle, fmt, ...) \ argument
1084 acpi_handle_printk(KERN_CRIT, handle, fmt, ##__VA_ARGS__)
1085 #define acpi_handle_err(handle, fmt, ...) \ argument
1086 acpi_handle_printk(KERN_ERR, handle, fmt, ##__VA_ARGS__)
1087 #define acpi_handle_warn(handle, fmt, ...) \ argument
1088 acpi_handle_printk(KERN_WARNING, handle, fmt, ##__VA_ARGS__)
1089 #define acpi_handle_notice(handle, fmt, ...) \ argument
1090 acpi_handle_printk(KERN_NOTICE, handle, fmt, ##__VA_ARGS__)
1091 #define acpi_handle_info(handle, fmt, ...) \ argument
1092 acpi_handle_printk(KERN_INFO, handle, fmt, ##__VA_ARGS__)
1095 #define acpi_handle_debug(handle, fmt, ...) \ argument
1096 acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__)
1099 #define acpi_handle_debug(handle, fmt, ...) \ argument
1101 handle, pr_fmt(fmt), ##__VA_ARGS__)
1103 #define acpi_handle_debug(handle, fmt, ...) \ argument
1106 acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__); \
1132 return -ENXIO; in acpi_dev_gpio_irq_get_by()
1141 /* Device properties */
1161 return !list_empty(&adev->data.properties); in acpi_dev_has_props()
1182 * struct acpi_probe_entry - boot-time probing entry
1237 (&ACPI_PROBE_TABLE_END(t) - \
1245 return -ENXIO; in acpi_dev_get_property()
1253 return -ENXIO; in __acpi_node_get_property_reference()
1261 return -ENXIO; in acpi_node_get_property_reference()
1268 return -ENXIO; in acpi_node_prop_get()
1288 return ERR_PTR(-ENXIO); in acpi_graph_get_next_endpoint()
1297 return -ENXIO; in acpi_graph_get_remote_endpoint()
1335 int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res);
1338 int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res) in acpi_irq_get() argument
1340 return -EINVAL; in acpi_irq_get()
1349 return -EINVAL; in lpit_read_residency_count_address()
1362 return -EINVAL; in acpi_pptt_cpu_is_thread()
1366 return -EINVAL; in find_acpi_cpu_topology()
1370 return -EINVAL; in find_acpi_cpu_topology_package()
1374 return -EINVAL; in find_acpi_cpu_topology_hetero_id()
1378 return -EINVAL; in find_acpi_cpu_cache_topology()
1383 extern void acpi_device_notify(struct device *dev);
1384 extern void acpi_device_notify_remove(struct device *dev);
1386 static inline void acpi_device_notify(struct device *dev) { } in acpi_device_notify()
1387 static inline void acpi_device_notify_remove(struct device *dev) { } in acpi_device_notify_remove()