~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/pci-pwrctl.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (C) 2024 Linaro Ltd.
  4  */
  5 
  6 #ifndef __PCI_PWRCTL_H__
  7 #define __PCI_PWRCTL_H__
  8 
  9 #include <linux/notifier.h>
 10 
 11 struct device;
 12 struct device_link;
 13 
 14 /*
 15  * This is a simple framework for solving the issue of PCI devices that require
 16  * certain resources (regulators, GPIOs, clocks) to be enabled before the
 17  * device can actually be detected on the PCI bus.
 18  *
 19  * The idea is to reuse the platform bus to populate OF nodes describing the
 20  * PCI device and its resources, let these platform devices probe and enable
 21  * relevant resources and then trigger a rescan of the PCI bus allowing for the
 22  * same device (with a second associated struct device) to be registered with
 23  * the PCI subsystem.
 24  *
 25  * To preserve a correct hierarchy for PCI power management and device reset,
 26  * we create a device link between the power control platform device (parent)
 27  * and the supplied PCI device (child).
 28  */
 29 
 30 /**
 31  * struct pci_pwrctl - PCI device power control context.
 32  * @dev: Address of the power controlling device.
 33  *
 34  * An object of this type must be allocated by the PCI power control device and
 35  * passed to the pwrctl subsystem to trigger a bus rescan and setup a device
 36  * link with the device once it's up.
 37  */
 38 struct pci_pwrctl {
 39         struct device *dev;
 40 
 41         /* Private: don't use. */
 42         struct notifier_block nb;
 43         struct device_link *link;
 44 };
 45 
 46 int pci_pwrctl_device_set_ready(struct pci_pwrctl *pwrctl);
 47 void pci_pwrctl_device_unset_ready(struct pci_pwrctl *pwrctl);
 48 int devm_pci_pwrctl_device_set_ready(struct device *dev,
 49                                      struct pci_pwrctl *pwrctl);
 50 
 51 #endif /* __PCI_PWRCTL_H__ */
 52 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php