Lines Matching defs:device

14 #include <linux/device.h>
162 static ssize_t id_show(struct device *dev, struct device_attribute *dev_attr,
173 static ssize_t state_show(struct device *dev, struct device_attribute *dev_attr,
184 static ssize_t monitor_id_show(struct device *dev,
195 static ssize_t class_id_show(struct device *dev,
207 static ssize_t device_id_show(struct device *dev,
219 static ssize_t modalias_show(struct device *dev,
229 static ssize_t numa_node_show(struct device *dev,
242 static ssize_t server_monitor_pending_show(struct device *dev,
256 static ssize_t client_monitor_pending_show(struct device *dev,
270 static ssize_t server_monitor_latency_show(struct device *dev,
284 static ssize_t client_monitor_latency_show(struct device *dev,
298 static ssize_t server_monitor_conn_id_show(struct device *dev,
312 static ssize_t client_monitor_conn_id_show(struct device *dev,
326 static ssize_t out_intr_mask_show(struct device *dev,
345 static ssize_t out_read_index_show(struct device *dev,
363 static ssize_t out_write_index_show(struct device *dev,
382 static ssize_t out_read_bytes_avail_show(struct device *dev,
401 static ssize_t out_write_bytes_avail_show(struct device *dev,
420 static ssize_t in_intr_mask_show(struct device *dev,
438 static ssize_t in_read_index_show(struct device *dev,
456 static ssize_t in_write_index_show(struct device *dev,
474 static ssize_t in_read_bytes_avail_show(struct device *dev,
493 static ssize_t in_write_bytes_avail_show(struct device *dev,
512 static ssize_t channel_vp_mapping_show(struct device *dev,
548 static ssize_t vendor_show(struct device *dev,
557 static ssize_t device_show(struct device *dev,
564 static DEVICE_ATTR_RO(device);
566 static ssize_t driver_override_store(struct device *dev,
600 static ssize_t driver_override_show(struct device *dev,
614 /* Set up per device attributes in /sys/bus/vmbus/devices/<bus device> */
655 struct device *dev = kobj_to_dev(kobj);
679 * vmbus_uevent - add uevent for our device
681 * This routine is invoked when a device is added or removed on the vmbus to
686 * representation of the device guid (each byte of the guid will be
689 static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
691 struct hv_device *dev = device_to_hv_device(device);
701 return NULL; /* empty device table */
756 /* vmbus_add_dynid - add a new device ID to this driver and re-probe devices */
813 * store_remove_id - remove a PCI device ID from this driver
815 * Removes a dynamic pci device ID to this driver.
856 * vmbus_match - Attempt to match the specified device to the specified driver
858 static int vmbus_match(struct device *device, struct device_driver *driver)
861 struct hv_device *hv_dev = device_to_hv_device(device);
874 * vmbus_probe - Add the new vmbus's child device
876 static int vmbus_probe(struct device *child_device)
888 pr_err("probe failed for device %s (%d)\n",
900 * vmbus_remove - Remove a vmbus device
902 static int vmbus_remove(struct device *child_device)
918 * vmbus_shutdown - Shutdown a vmbus device
920 static void vmbus_shutdown(struct device *child_device)
926 /* The device may not be attached yet */
938 * vmbus_suspend - Suspend a vmbus device
940 static int vmbus_suspend(struct device *child_device)
945 /* The device may not be attached yet */
957 * vmbus_resume - Resume a vmbus device
959 static int vmbus_resume(struct device *child_device)
964 /* The device may not be attached yet */
980 * vmbus_device_release - Final callback release of the vmbus child device
982 static void vmbus_device_release(struct device *device)
984 struct hv_device *hv_dev = device_to_hv_device(device);
1935 * vmbus_add_channel_kobj - setup a sub-directory under device/channels
1939 const struct device *device = &dev->device;
1960 dev_err(device, "Unable to set up channel sysfs files\n");
1978 * vmbus_device_create - Creates and registers a new child device
1989 pr_err("Unable to allocate device object for child device\n");
2002 * vmbus_device_register - Register the child device
2006 struct kobject *kobj = &child_device_obj->device.kobj;
2009 dev_set_name(&child_device_obj->device, "%pUl",
2012 child_device_obj->device.bus = &hv_bus;
2013 child_device_obj->device.parent = &hv_acpi_dev->dev;
2014 child_device_obj->device.release = vmbus_device_release;
2017 * Register with the LDM. This will kick off the driver/device
2020 ret = device_register(&child_device_obj->device);
2022 pr_err("Unable to register child device\n");
2023 put_device(&child_device_obj->device);
2048 device_unregister(&child_device_obj->device);
2053 * vmbus_device_unregister - Remove the specified child device
2058 pr_debug("child device %s unregistered\n",
2059 dev_name(&device_obj->device));
2064 * Kick off the process of unregistering the device.
2067 device_unregister(&device_obj->device);
2072 * VMBUS is an acpi enumerated device. Get the information we
2181 static int vmbus_acpi_remove(struct acpi_device *device)
2256 const char *dev_n = dev_name(&device_obj->device);
2345 static int vmbus_acpi_add(struct acpi_device *device)
2351 hv_acpi_dev = device;
2353 result = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
2359 * Some ancestor of the vmbus acpi device (Gen1 or Gen2
2362 for (ancestor = device->parent; ancestor; ancestor = ancestor->parent) {
2378 vmbus_acpi_remove(device);
2383 static int vmbus_bus_suspend(struct device *dev)
2464 static int vmbus_bus_resume(struct device *dev)
2500 pr_err("Some vmbus device is missing after suspending?\n");
2521 * PCI device assignment, because "pci_dev_pm_ops" uses the "noirq" ops: in