Lines Matching refs:device

29  * The modalias file will contain the guid of the device.
31 static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
66 int visor_check_channel(struct channel_header *ch, struct device *dev,
112 static int visorbus_uevent(struct device *xdev, struct kobj_uevent_env *env)
126 * @xdev: struct device for the device being matched
127 * @xdrv: struct device_driver for driver to match device against
129 * Return: 1 iff the provided driver can control the specified device
131 static int visorbus_match(struct device *xdev, struct device_driver *xdrv)
174 static int match_visorbus_dev_by_id(struct device *dev, const void *data)
188 struct device *dev;
189 struct device *dev_start = NULL;
196 dev_start = &from->device;
206 * the bus device instance, after all other tasks
208 * @xdev: struct device for the bus being released
210 static void visorbus_release_busdevice(struct device *xdev)
222 * each child device instance
223 * @xdev: struct device for the visor device being released
225 static void visorbus_release_device(struct device *xdev)
238 static ssize_t physaddr_show(struct device *dev, struct device_attribute *attr,
248 static ssize_t nbytes_show(struct device *dev, struct device_attribute *attr,
258 static ssize_t clientpartition_show(struct device *dev,
268 static ssize_t typeguid_show(struct device *dev, struct device_attribute *attr,
279 static ssize_t zoneguid_show(struct device *dev, struct device_attribute *attr,
290 static ssize_t typename_show(struct device *dev, struct device_attribute *attr,
326 static ssize_t partition_handle_show(struct device *dev,
336 static ssize_t partition_guid_show(struct device *dev,
345 static ssize_t partition_name_show(struct device *dev,
354 static ssize_t channel_addr_show(struct device *dev,
364 static ssize_t channel_bytes_show(struct device *dev,
374 static ssize_t channel_id_show(struct device *dev,
411 * @devix: the device index to be included in the output data, or -1 if no
412 * device index is to be included
419 /* uninitialized vbus device entry */
425 /* vbus device entry is for bus or chipset */
451 "Client device/driver info for %s partition (vbus #%u):\n",
490 struct visor_driver *drv = to_visor_driver(dev->device.driver);
502 get_device(&dev->device);
516 put_device(&dev->device);
520 * visordriver_remove_device() - handle visor device going away
521 * @xdev: struct device for the visor device being removed
523 * This is called when device_unregister() is called for each child device
524 * instance, to notify the appropriate visorbus function driver that the device
525 * is going away, and to decrease the reference count of the device.
529 static int visordriver_remove_device(struct device *xdev)
539 put_device(&dev->device);
559 * @dev: the device whose channel is read from
578 * @dev: the device whose channel is written to
596 * designated device
597 * @dev: the device on which to enable interrupts
604 struct visor_driver *drv = to_visor_driver(dev->device.driver);
607 dev_err(&dev->device, "%s no interrupt function!\n", __func__);
617 * designated device
618 * @dev: the device on which to disable interrupts
627 * create_visor_device() - create visor device as a result of receiving the
628 * controlvm device_create message for a new device
632 * This is how everything starts from the device end.
641 * the new device struct will just stick around in the bus' list of devices.
643 * visor_driver.probe() for the new driver will be called with the new device.
655 dev->device.bus = &visorbus_type;
656 dev->device.groups = channel_groups;
657 device_initialize(&dev->device);
658 dev->device.release = visorbus_release_device;
660 get_device(&dev->device);
667 err = dev_set_name(&dev->device, "vbus%u:dev%u",
676 * if (dev.drv) ** device already has a driver **
685 * device. The device will be linked onto bus_type.klist_devices
688 err = device_add(&dev->device);
698 put_device(&dev->device);
699 dev_err(&dev->device, "Creating visor device failed. %d\n", err);
706 put_device(&dev->device);
709 device_unregister(&dev->device);
713 struct device *dev,
750 * device functionality.
776 * device functionality.
797 * @devix: the relative device number (0..n-1) of the device on the bus
799 * Writes device info into the channel memory to be used for diagnostic
803 * device functionality.
836 * publish_vbus_dev_info() - for a child device just created on a client bus,
838 * controlling this device into the appropriate slot
840 * @visordev: struct visor_device for the desired device
853 if (!visordev->device.driver)
861 visordrv = to_visor_driver(visordev->device.driver);
864 * Within the list of device types (by GUID) that the driver
866 * the type of this device, so that we can include the device
884 * visordriver_probe_device() - handle new visor device coming online
885 * @xdev: struct device for the visor device being probed
890 * driver and device.
892 * If successful, a reference to the device will be held onto via get_device().
895 * was successful with this device, otherwise a negative errno
898 static int visordriver_probe_device(struct device *xdev)
912 get_device(&dev->device);
920 * handling one or more visor device
928 * Here's how the whole Linux bus / driver / device model works.
933 * All kernel modules that support particular device types on a
953 * ** actual device driver as part of
956 * The above dance also happens when a new device appears.
959 * pci_scan_device() shows an example of how to build a device struct. It
1002 * visorbus_create_instance() - create a device instance for the visorbus itself
1017 dev_set_name(&dev->device, "visorbus%d", id);
1018 dev->device.bus = &visorbus_type;
1019 dev->device.groups = visorbus_groups;
1020 dev->device.release = visorbus_release_busdevice;
1021 dev->debugfs_dir = debugfs_create_dir(dev_name(&dev->device),
1026 dev_set_drvdata(&dev->device, dev);
1027 err = get_vbus_header_info(dev->visorchannel, &dev->device, hdr_info);
1030 err = device_register(&dev->device);
1044 dev_err(&dev->device, "%s failed: %d\n", __func__, err);
1049 * visorbus_remove_instance() - remove a device instance for the visorbus itself
1066 device_unregister(&dev->device);
1070 * remove_all_visor_devices() - remove all child visorbus device instances
1087 * pending "pause device" operation has
1089 * @dev: struct visor_device identifying the paused device
1106 * pending "resume device" operation has
1108 * @dev: struct visor_device identifying the resumed device
1129 * operation for a visor device
1130 * @dev: struct visor_device identifying the device being paused or resumed
1133 * Tell the subordinate function driver for a specific device to pause
1134 * or resume that device. Success/failure result is returned asynchronously
1144 /* If no driver associated with the device nothing to pause/resume */
1145 if (!dev->device.driver)
1150 drv = to_visor_driver(dev->device.driver);
1167 * visorchipset_device_pause() - start a pause operation for a visor device
1168 * @dev_info: struct visor_device identifying the device being paused
1170 * Tell the subordinate function driver for a specific device to pause
1171 * that device. Success/failure result is returned asynchronously
1187 * visorchipset_device_resume() - start a resume operation for a visor device
1188 * @dev_info: struct visor_device identifying the device being resumed
1190 * Tell the subordinate function driver for a specific device to resume
1191 * that device. Success/failure result is returned asynchronously