Lines Matching refs:device

75  * hl_device_release - release function for habanalabs device
80 * Called when process closes an habanalabs device
117 * hl_mmap - mmap function for habanalabs device
122 * Called when process does an mmap on habanalabs device. Call the device's mmap
158 static void device_release_func(struct device *dev)
164 * device_init_cdev - Initialize cdev and device for habanalabs device
166 * @hdev: pointer to habanalabs device structure
167 * @hclass: pointer to the class object of the device
168 * @minor: minor number of the specific device
169 * @fpos: file operations to install for this device
170 * @name: name of the device as it will appear in the filesystem
171 * @cdev: pointer to the char device object that will be initialized
172 * @dev: pointer to the device object that will be initialized
174 * Initialize a cdev and a Linux device for habanalabs's device.
179 struct device **dev)
205 "failed to add a char device to the system\n");
212 "failed to add a control char device to the system\n");
216 /* hl_sysfs_init() must be done after adding the device to the system */
249 * device_early_init - do some early initialization for the habanalabs device
251 * @hdev: pointer to habanalabs device structure
366 * @hdev: pointer to habanalabs device structure
434 * device_late_init - do late stuff initialization for the habanalabs device
436 * @hdev: pointer to habanalabs device structure
438 * Do stuff that either needs the device H/W queues to be active or needs
482 * @hdev: pointer to habanalabs device structure
512 /* check case that device is currently in idle */
535 * 1. If the device is currently busy
536 * 2. If the device was idle during the whole sampling
541 /* Check if the device is currently busy */
597 * hl_device_set_frequency - set the frequency of the device
599 * @hdev: pointer to habanalabs device structure
615 dev_dbg(hdev->dev, "Changing device frequency to %s\n",
634 "Failed to disable debug mode because device was not in debug mode\n");
652 "Failed to enable debug mode because device is already in debug mode\n");
667 * hl_device_suspend - initiate device suspend
669 * @hdev: pointer to habanalabs device structure
705 "Failed to disable PCI access of device CPU\n");
707 /* Shut down the device */
715 * hl_device_resume - initiate device resume
717 * @hdev: pointer to habanalabs device structure
732 "Failed to enable PCI device in resume\n");
740 dev_err(hdev->dev, "Failed to resume device after suspend\n");
750 dev_err(hdev->dev, "Failed to reset device during resume\n");
831 * hl_device_reset - reset the device
833 * @hdev: pointer to habanalabs device structure
844 * Enable device
876 /* Disable PCI access from device F/W so he won't send
880 * the access here because if the device is marked
882 * of heartbeat, the device CPU is marked as disable
900 /* Flush anyone that is inside device open */
904 dev_err(hdev->dev, "Going to RESET device!\n");
1050 * communication with the device firmware to get information that
1062 /* Check that the communication with the device is working */
1066 "Failed to detect if device is alive after reset\n");
1102 dev_warn(hdev->dev, "Successfully finished resetting the device\n");
1127 * hl_device_init - main initialization function for habanalabs device
1129 * @hdev: pointer to habanalabs device structure
1131 * Allocate an id for the device, do early initialization and then call the
1133 * Linux device to expose it to the user
1147 /* Initialize cdev and device structures */
1162 /* Initialize cdev and device structures for control device */
1187 * registers of the device
1282 * communication with the device firmware to get information that
1294 /* Check that the communication with the device is working */
1297 dev_err(hdev->dev, "Failed to detect if device is alive\n");
1309 dev_info(hdev->dev, "Found %s device with %lluGB DRAM\n",
1341 * there we get the information from the device about which
1342 * hwmon-related sensors the device supports.
1343 * Furthermore, it must be done after adding the device to the system.
1353 "Successfully added device to habanalabs driver\n");
1397 * hl_device_fini - main tear-down function for habanalabs device
1399 * @hdev: pointer to habanalabs device structure
1401 * Destroy the device, call ASIC fini functions and release the id
1408 dev_info(hdev->dev, "Removing device\n");
1425 WARN(1, "Failed to remove device because reset function did not finish\n");
1430 /* Disable PCI access from device F/W so it won't send us additional
1433 * disable the access here because if the device is marked disable, the
1434 * message won't be send. Also, in case of heartbeat, the device CPU is
1439 /* Mark device as disabled */
1448 /* Flush anyone that is inside device open */
1507 pr_info("removed device successfully\n");
1517 * @hdev: pointer to habanalabs device structure
1531 * @hdev: pointer to habanalabs device structure