include/linux/pci-pwrctrl.h

Source file repositories/reference/linux-study-clean/include/linux/pci-pwrctrl.h

File Facts

System
Linux kernel
Corpus path
include/linux/pci-pwrctrl.h
Extension
.h
Size
2592 bytes
Lines
69
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct pci_pwrctrl {
	struct device *dev;
	int (*power_on)(struct pci_pwrctrl *pwrctrl);
	int (*power_off)(struct pci_pwrctrl *pwrctrl);

	/* private: internal use only */
	struct notifier_block nb;
	struct device_link *link;
	struct work_struct work;
};

void pci_pwrctrl_init(struct pci_pwrctrl *pwrctrl, struct device *dev);
int pci_pwrctrl_device_set_ready(struct pci_pwrctrl *pwrctrl);
void pci_pwrctrl_device_unset_ready(struct pci_pwrctrl *pwrctrl);
int devm_pci_pwrctrl_device_set_ready(struct device *dev,
				     struct pci_pwrctrl *pwrctrl);
#if IS_ENABLED(CONFIG_PCI_PWRCTRL)
int pci_pwrctrl_create_devices(struct device *parent);
void pci_pwrctrl_destroy_devices(struct device *parent);
int pci_pwrctrl_power_on_devices(struct device *parent);
void pci_pwrctrl_power_off_devices(struct device *parent);
#else
static inline int pci_pwrctrl_create_devices(struct device *parent) { return 0; }
static void pci_pwrctrl_destroy_devices(struct device *parent) { }
static inline int pci_pwrctrl_power_on_devices(struct device *parent) { return 0; }
static void pci_pwrctrl_power_off_devices(struct device *parent) { }
#endif
#endif /* __PCI_PWRCTRL_H__ */

Annotation

Implementation Notes