Lines Matching defs:path

304  * get_node_path fills in @path with the firmware path to the device.
310 static void get_node_path(struct device *dev, struct hardware_path *path)
313 memset(&path->bc, -1, 6);
317 path->mod = PCI_FUNC(devfn);
318 path->bc[i--] = PCI_SLOT(devfn);
325 path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5);
327 path->bc[i--] = to_parisc_device(dev)->hw_path;
333 static char *print_hwpath(struct hardware_path *path, char *output)
337 if (path->bc[i] == -1)
339 output += sprintf(output, "%u/", (unsigned char) path->bc[i]);
341 output += sprintf(output, "%u", (unsigned char) path->mod);
346 * print_pa_hwpath - Returns hardware path for PA devices
347 * @dev: The device to return the path for
348 * @output: Pointer to a previously-allocated array to place the path in.
350 * This function fills in the output array with a human-readable path
356 struct hardware_path path;
358 get_node_path(dev->dev.parent, &path);
359 path.mod = dev->hw_path;
360 return print_hwpath(&path, output);
366 * get_pci_node_path - Determines the hardware path for a PCI device
367 * @pdev: The device to return the path for
368 * @path: Pointer to a previously-allocated array to place the path in.
374 void get_pci_node_path(struct pci_dev *pdev, struct hardware_path *path)
376 get_node_path(&pdev->dev, path);
381 * print_pci_hwpath - Returns hardware path for PCI devices
382 * @dev: The device to return the path for
383 * @output: Pointer to a previously-allocated array to place the path in.
385 * This function fills in the output array with a human-readable path
391 struct hardware_path path;
393 get_pci_node_path(dev, &path);
394 return print_hwpath(&path, output);
402 struct hardware_path path;
407 get_node_path(padev->dev.parent, &path);
410 if (path.bc[i] == -1)
412 output += sprintf(output, "%u:", (unsigned char) path.bc[i]);
465 * @id: the element of the module path for this entry
513 pr_err("Two devices have hardware path [%s]. IODC data for second device: %7phN\n"
649 * match_pci_device - Matches a pci device against a given hardware path
653 * @modpath: the hardware path.
654 * @return: true if the device matches the hardware path.
663 /* we are at the end of the path, and on the actual device */
679 * path entry.
682 * @modpath: the hardware path.
683 * @return: true if the device matches the hardware path.
751 * hwpath_to_device - Finds the generic device corresponding to a given hardware path.
752 * @modpath: the hardware path.
776 * @path: pointer to a previously allocated hwpath struct to be filled in
778 void device_to_hwpath(struct device *dev, struct hardware_path *path)
783 get_node_path(dev->parent, path);
784 path->mod = padev->hw_path;
786 get_node_path(dev, path);
848 struct hardware_path path;
850 get_node_path(parent, &path);
858 path.mod = i;
859 dev = alloc_pa_dev(hpa, &path);
1031 pr_cont("\t.path = { ");
1032 pr_cont(".flags = 0x%x, ", mod_path.path.flags);
1034 (unsigned char)mod_path.path.bc[0],
1035 (unsigned char)mod_path.path.bc[1],
1036 (unsigned char)mod_path.path.bc[2],
1037 (unsigned char)mod_path.path.bc[3],
1038 (unsigned char)mod_path.path.bc[4],
1039 (unsigned char)mod_path.path.bc[5]);
1040 pr_cont(".mod = 0x%x ", mod_path.path.mod);