Lines Matching defs:device
10 #include <linux/device.h>
33 * pci_add_dynid - add a new PCI device ID to this driver and re-probe devices
36 * @device: PCI device ID
43 * Adds a new dynamic pci device ID to this driver and causes the
54 unsigned int vendor, unsigned int device,
66 dynid->id.device = device;
94 * pci_match_id - See if a PCI device matches a given pci_id table
95 * @ids: array of PCI device ID structures to search in
96 * @dev: the PCI device structure to match against.
98 * Used by a driver to check whether a PCI device is in its list of
121 .device = PCI_ANY_ID,
127 * pci_match_device - See if a device matches a driver's list of IDs
129 * @dev: the PCI device structure to match against
131 * Used by a driver to check whether a PCI device is in its list of
182 * @driver: target device driver
183 * @buf: buffer for scanning device ID data
193 u32 vendor, device, subvendor = PCI_ANY_ID,
200 &vendor, &device, &subvendor, &subdevice,
211 pdev->device = device;
240 retval = pci_add_dynid(pdrv, vendor, device, subvendor, subdevice,
249 * remove_id_store - remove a PCI device ID from this driver
250 * @driver: target device driver
251 * @buf: buffer for scanning device ID data
254 * Removes a dynamic pci device ID to this driver.
261 u32 vendor, device, subvendor = PCI_ANY_ID,
267 &vendor, &device, &subvendor, &subdevice,
276 (id->device == device) &&
310 struct device *dev = &pci_dev->dev;
315 * runtime PM status. During probe, the device is set to
357 * Execute driver initialization on node where the device is
368 * device is probed from work_on_cpu() of the Physical device.
400 * __pci_device_probe - check if a driver wants to claim a specific PCI device
401 * @drv: driver to call to check if it wants the PCI device
402 * @pci_dev: PCI device being probed
444 static int pci_device_probe(struct device *dev)
469 static void pci_device_remove(struct device *dev)
494 * If the device is still on, set the power state as "unknown",
512 static void pci_device_shutdown(struct device *dev)
524 * device to tell it to not continue to do DMA. Don't touch
538 * pci_restore_standard_config - restore standard config registers of PCI device
539 * @pci_dev: PCI device to handle
616 * e.g. the BIOS will change its device state when we suspend.
630 /* if the device was enabled before suspend, re-enable */
633 * if the device was busmaster before the suspend, make it busmaster
642 static int pci_legacy_suspend(struct device *dev, pm_message_t state)
669 static int pci_legacy_suspend_late(struct device *dev)
683 static int pci_legacy_resume(struct device *dev)
713 pci_WARN(pci_dev, ret && drv->driver.pm, "device %04x:%04x\n",
714 pci_dev->vendor, pci_dev->device);
721 static int pci_pm_prepare(struct device *dev)
739 * optimization is used with respect to this device.
745 static void pci_pm_complete(struct device *dev)
752 /* Resume device if platform firmware has put it in reset-power-on */
761 * power state of another device sharing it. However, in that
762 * case it is also better to resume the device, in general.
790 static int pci_pm_suspend(struct device *dev)
814 * system suspend. Namely, if the device is expected to wake up the
816 * purpose, or if the device is not expected to wake up the system from
820 * Also if the driver of the device does not indicate that its system
822 * better to resume the device from runtime suspend here.
844 "PCI PM: State of device not saved by %pS\n",
852 static int pci_pm_suspend_late(struct device *dev)
862 static int pci_pm_suspend_noirq(struct device *dev)
890 "PCI PM: State of device not saved by %pS\n",
900 * If the device is a bridge with a child in D0 below it,
915 * downstream device is in D0, so avoid changing the power state
936 * device has been suspended, we can safely set it to 0 here.
946 * to check whether or not the device's wakeup settings are good for
948 * pci_pm_complete() to take care of fixing up the device's state
957 static int pci_pm_resume_noirq(struct device *dev)
991 static int pci_pm_resume_early(struct device *dev)
999 static int pci_pm_resume(struct device *dev)
1006 * called without restoring the standard config registers of the device.
1041 static int pci_pm_freeze(struct device *dev)
1077 static int pci_pm_freeze_noirq(struct device *dev)
1102 static int pci_pm_thaw_noirq(struct device *dev)
1108 * The pm->thaw_noirq() callback assumes the device has been
1112 * space, which requires the device to be in D0, so return it to D0
1128 static int pci_pm_thaw(struct device *dev)
1149 static int pci_pm_poweroff(struct device *dev)
1183 static int pci_pm_poweroff_late(struct device *dev)
1193 static int pci_pm_poweroff_noirq(struct device *dev)
1233 static int pci_pm_restore_noirq(struct device *dev)
1250 static int pci_pm_restore(struct device *dev)
1257 * called without restoring the standard config registers of the device.
1293 static int pci_pm_runtime_suspend(struct device *dev)
1303 * If pci_dev->driver is not set (unbound), we leave the device in D0,
1337 "PCI PM: State of device not saved by %pS\n",
1350 static int pci_pm_runtime_resume(struct device *dev)
1358 * Restoring config space is necessary even if the device is not bound
1380 static int pci_pm_runtime_idle(struct device *dev)
1386 * If pci_dev->driver is not set (unbound), the device should
1445 * no device was claimed during registration.
1472 * each device it was responsible for, and marks those devices as
1488 * pci_dev_driver - get the pci_driver of a device
1489 * @dev: the device to query
1492 * registered driver for the device.
1510 * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure
1511 * @dev: the PCI device structure to match against
1512 * @drv: the device driver to search for matching PCI device id structures
1514 * Used by a driver to check whether a PCI device present in the
1518 static int pci_bus_match(struct device *dev, struct device_driver *drv)
1536 * pci_dev_get - increments the reference count of the pci device structure
1537 * @dev: the device being referenced
1539 * Each live reference to a device should be refcounted.
1542 * their probe() methods, when they bind to a device, and release
1545 * A pointer to the device with the incremented reference counter is returned.
1556 * pci_dev_put - release a use of the pci device structure
1557 * @dev: device that's been disconnected
1559 * Must be called when a user of a device is finished with it. When the last
1560 * user of the device calls this function, the memory of the device is freed.
1569 static int pci_uevent(const struct device *dev, struct kobj_uevent_env *env)
1581 if (add_uevent_var(env, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device))
1592 pdev->vendor, pdev->device,
1603 * pci_uevent_ers - emit a uevent during recovery path of PCI device
1604 * @pdev: PCI device undergoing error recovery
1637 static int pci_bus_num_vf(struct device *dev)
1649 static int pci_dma_configure(struct device *dev)
1652 struct device *bridge;
1677 static void pci_dma_cleanup(struct device *dev)
1703 static int pcie_port_bus_match(struct device *dev, struct device_driver *drv)