Lines Matching defs:device

39 	"Do device reset on lockup (0 = no, 1 = yes, default yes)");
54 * get_asic_type - translate device id to asic type
56 * @device: id of the PCI device
58 * Translate device id to asic type.
59 * In case of unidentified device, return -1
61 static enum hl_asic_type get_asic_type(u16 device)
65 switch (device) {
81 * hl_device_open - open function for habanalabs device
86 * Called when process opens an habanalabs device.
99 pr_err("Couldn't find device %d:%d\n",
191 pr_err("Couldn't find device %d:%d\n",
247 * create_hdev - create habanalabs device instance
249 * @dev: will hold the pointer to the new habanalabs device structure
250 * @pdev: pointer to the pci device
251 * @asic_type: in case of simulator device, which device is it
252 * @minor: in case of simulator device, the minor of the device
254 * Allocate memory for habanalabs device and initialize basic fields
256 * Allocate ID (minor) for the device (only for real devices)
274 hdev->asic_type = get_asic_type(pdev->device);
296 hdev->pdev = pdev; /* can be NULL in case of simulator device */
303 /* Always save 2 numbers, 1 for main device and 1 for control.
342 * destroy_hdev - destroy habanalabs device instance
344 * @dev: pointer to the habanalabs device structure
349 /* Remove device from the device list */
358 static int hl_pmops_suspend(struct device *dev)
362 pr_debug("Going to suspend PCI device\n");
365 pr_err("device pointer is NULL in suspend\n");
372 static int hl_pmops_resume(struct device *dev)
376 pr_debug("Going to resume PCI device\n");
379 pr_err("device pointer is NULL in resume\n");
389 * @pdev: pointer to pci device
390 * @id: pointer to pci device id structure
392 * Standard PCI probe function for habanalabs device.
393 * Create a new habanalabs device and initialize it according to the
394 * device's type
403 " device found [%04x:%04x] (rev %x)\n",
404 (int)pdev->vendor, (int)pdev->device, (int)pdev->revision);
416 dev_err(&pdev->dev, "Fatal error during habanalabs device init\n");
434 * @pdev: pointer to pci device
436 * Standard PCI remove function for habanalabs device
453 * hl_pci_err_detected - a PCI bus error detected on this device
455 * @pdev: pointer to pci device
493 * @pdev: pointer to pci device
500 dev_warn(hdev->dev, "Resuming device after PCI slot reset\n");
507 * @pdev: pointer to pci device
566 pr_err("failed to register pci device\n");