• Home
  • Raw
  • Download

Lines Matching +full:device +full:- +full:handle

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * acpi_bus.h - ACPI Bus Driver ($Revision: 22 $)
12 #include <linux/device.h>
27 acpi_evaluate_integer(acpi_handle handle,
31 acpi_evaluate_reference(acpi_handle handle,
36 acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code,
40 acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld);
42 bool acpi_has_method(acpi_handle handle, char *name);
43 acpi_status acpi_execute_simple_method(acpi_handle handle, char *method,
45 acpi_status acpi_evaluate_ej0(acpi_handle handle);
46 acpi_status acpi_evaluate_lck(acpi_handle handle, int lock);
47 acpi_status acpi_evaluate_reg(acpi_handle handle, u8 space_id, u32 function);
48 bool acpi_ata_match(acpi_handle handle);
49 bool acpi_bay_match(acpi_handle handle);
50 bool acpi_dock_match(acpi_handle handle);
52 bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
53 union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
57 acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev, in acpi_evaluate_dsm_typed() argument
63 obj = acpi_evaluate_dsm(handle, guid, rev, func, argv4); in acpi_evaluate_dsm_typed()
64 if (obj && obj->type != type) { in acpi_evaluate_dsm_typed()
105 * -----------------
128 void (*bind)(struct device *phys_dev);
129 void (*unbind)(struct device *phys_dev);
135 * --------------------
147 * -----------
150 typedef int (*acpi_op_add) (struct acpi_device * device);
151 typedef int (*acpi_op_remove) (struct acpi_device * device);
152 typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
160 #define ACPI_DRIVER_ALL_NOTIFY_EVENTS 0x1 /* system AND device events */
173 * ACPI Device
174 * -----------
213 #define acpi_device_dir(d) ((d)->dir.entry)
241 acpi_device_name device_name; /* Driver-determined */
246 #define acpi_device_bid(d) ((d)->pnp.bus_id)
247 #define acpi_device_adr(d) ((d)->pnp.bus_address)
248 const char *acpi_device_hid(struct acpi_device *device);
249 #define acpi_device_uid(d) ((d)->pnp.unique_id)
250 #define acpi_device_name(d) ((d)->pnp.device_name)
251 #define acpi_device_class(d) ((d)->pnp.device_class)
258 u32 inrush_current:1; /* Serialize Dx->D0 */
259 u32 power_removed:1; /* Optimize Dx->D0 */
272 int latency; /* Dx->D0 time (microseconds) */
279 struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
295 int latency; /* Px->P0 time (microseconds) */
308 u8 notifier_present:1; /* Wake-up notify handler has been installed */
313 struct device *dev;
331 struct device *dev;
341 /* ACPI Device Specific Data (_DSD) */
351 /* Device */
354 acpi_handle handle; /* no handle for fixed hardware */ member
374 struct device dev;
382 /* Non-device subnode */
385 acpi_handle handle; member
429 fwnode->ops == &acpi_static_fwnode_ops; in is_acpi_static_node()
436 (!strcmp(to_acpi_data_node(fwnode)->name, name)) : false; in acpi_data_node_match()
441 return &adev->fwnode; in acpi_fwnode_handle()
446 return d->driver_data; in acpi_driver_data()
454 *((u32 *)&adev->status) = sta; in acpi_set_device_status()
460 hp->self = adev; in acpi_set_hp_context()
461 adev->hp = hp; in acpi_set_hp_context()
474 * ------
499 int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
500 struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle);
502 acpi_status acpi_bus_get_status_handle(acpi_handle handle,
504 int acpi_bus_get_status(struct acpi_device *device);
506 int acpi_bus_set_power(acpi_handle handle, int state);
508 int acpi_device_set_power(struct acpi_device *device, int state);
509 int acpi_bus_init_power(struct acpi_device *device);
510 int acpi_device_fix_up_power(struct acpi_device *device);
511 int acpi_bus_update_power(acpi_handle handle, int *state_p);
512 int acpi_device_update_power(struct acpi_device *device, int *state_p);
513 bool acpi_bus_power_manageable(acpi_handle handle);
515 struct device *dev);
517 struct device *dev);
520 bool acpi_bus_can_wakeup(acpi_handle handle);
522 static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; } in acpi_bus_can_wakeup() argument
532 int acpi_bus_scan(acpi_handle handle);
534 acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd);
535 int acpi_match_device_ids(struct acpi_device *device,
544 return adev && adev->flags.initialized && adev->flags.visited; in acpi_device_enumerated()
548 * module_acpi_driver(acpi_driver) - Helper macro for registering an ACPI driver
565 bool (*match)(struct device *dev);
566 struct acpi_device * (*find_companion)(struct device *);
567 void (*setup)(struct device *);
568 void (*cleanup)(struct device *);
572 int acpi_bind_one(struct device *dev, struct acpi_device *adev);
573 int acpi_unbind_one(struct device *dev);
576 struct acpi_device * device; member
590 int acpi_dma_get_range(struct device *dev, const struct bus_dma_region **map);
591 int acpi_dma_configure_id(struct device *dev, enum dev_dma_attr attr,
593 static inline int acpi_dma_configure(struct device *dev, in acpi_dma_configure()
601 struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
617 void acpi_pm_wakeup_event(struct device *dev);
618 acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
621 bool acpi_pm_device_can_wakeup(struct device *dev);
622 int acpi_pm_device_sleep_state(struct device *, int *, int);
623 int acpi_pm_set_device_wakeup(struct device *dev, bool enable);
625 static inline void acpi_pm_wakeup_event(struct device *dev) in acpi_pm_wakeup_event()
629 struct device *dev, in acpi_add_pm_notifier()
638 static inline bool acpi_pm_device_can_wakeup(struct device *dev) in acpi_pm_device_can_wakeup()
642 static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) in acpi_pm_device_sleep_state()
650 static inline int acpi_pm_set_device_wakeup(struct device *dev, bool enable) in acpi_pm_set_device_wakeup()
652 return -ENODEV; in acpi_pm_set_device_wakeup()
670 return adev->flags.power_manageable; in acpi_device_power_manageable()
675 return adev->wakeup.flags.valid; in acpi_device_can_wakeup()
680 return adev->power.states[ACPI_STATE_D3_COLD].flags.valid || in acpi_device_can_poweroff()
682 adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set); in acpi_device_can_poweroff()
693 put_device(&adev->dev); in acpi_dev_put()