Lines Matching defs:device

16 #include <linux/device.h>
21 static ssize_t show_available_governors(struct device *dev,
42 static ssize_t show_current_driver(struct device *dev,
60 static ssize_t show_current_governor(struct device *dev,
76 static ssize_t store_current_governor(struct device *dev,
122 * @dev: the target device
124 int cpuidle_add_interface(struct device *dev)
131 * @dev: the target device
133 void cpuidle_remove_interface(struct device *dev)
344 struct cpuidle_device *device;
402 #define kobj_to_device(k) (kobj_to_state_obj(k)->device)
455 static inline void cpuidle_free_state_kobj(struct cpuidle_device *device, int i)
457 cpuidle_remove_s2idle_attr_group(device->kobjs[i]);
458 kobject_put(&device->kobjs[i]->kobj);
459 wait_for_completion(&device->kobjs[i]->kobj_unregister);
460 kfree(device->kobjs[i]);
461 device->kobjs[i] = NULL;
466 * @device: the target device
468 static int cpuidle_add_state_sysfs(struct cpuidle_device *device)
472 struct cpuidle_device_kobj *kdev = device->kobj_dev;
473 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device);
483 kobj->state_usage = &device->states_usage[i];
484 kobj->device = device;
496 device->kobjs[i] = kobj;
503 cpuidle_free_state_kobj(device, i);
509 * @device: the target device
511 static void cpuidle_remove_state_sysfs(struct cpuidle_device *device)
513 struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device);
517 cpuidle_free_state_kobj(device, i);
603 * @dev: the target device
635 * @dev: the target device
657 * cpuidle_add_device_sysfs - adds device specific sysfs attributes
658 * @device: the target device
660 int cpuidle_add_device_sysfs(struct cpuidle_device *device)
664 ret = cpuidle_add_state_sysfs(device);
668 ret = cpuidle_add_driver_sysfs(device);
670 cpuidle_remove_state_sysfs(device);
675 * cpuidle_remove_device_sysfs : removes device specific sysfs attributes
676 * @device : the target device
678 void cpuidle_remove_device_sysfs(struct cpuidle_device *device)
680 cpuidle_remove_driver_sysfs(device);
681 cpuidle_remove_state_sysfs(device);
685 * cpuidle_add_sysfs - creates a sysfs instance for the target device
686 * @dev: the target device
691 struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
728 * cpuidle_remove_sysfs - deletes a sysfs instance on the target device
729 * @dev: the target device