Lines Matching refs:device
66 struct acpi_device *device = cdev->devdata; in memory_get_max_bandwidth() local
67 acpi_handle handle = device->handle; in memory_get_max_bandwidth()
92 struct acpi_device *device = cdev->devdata; in memory_get_cur_bandwidth() local
93 acpi_handle handle = device->handle; in memory_get_cur_bandwidth()
115 struct acpi_device *device = cdev->devdata; in memory_set_cur_bandwidth() local
116 acpi_handle handle = device->handle; in memory_set_cur_bandwidth()
154 static int intel_menlow_memory_add(struct acpi_device *device) in intel_menlow_memory_add() argument
159 if (!device) in intel_menlow_memory_add()
162 if (!acpi_has_method(device->handle, MEMORY_GET_BANDWIDTH)) in intel_menlow_memory_add()
165 if (!acpi_has_method(device->handle, MEMORY_SET_BANDWIDTH)) in intel_menlow_memory_add()
168 cdev = thermal_cooling_device_register("Memory controller", device, in intel_menlow_memory_add()
175 device->driver_data = cdev; in intel_menlow_memory_add()
176 result = sysfs_create_link(&device->dev.kobj, in intel_menlow_memory_add()
177 &cdev->device.kobj, "thermal_cooling"); in intel_menlow_memory_add()
181 result = sysfs_create_link(&cdev->device.kobj, in intel_menlow_memory_add()
182 &device->dev.kobj, "device"); in intel_menlow_memory_add()
184 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); in intel_menlow_memory_add()
197 static int intel_menlow_memory_remove(struct acpi_device *device) in intel_menlow_memory_remove() argument
199 struct thermal_cooling_device *cdev = acpi_driver_data(device); in intel_menlow_memory_remove()
201 if (!device || !cdev) in intel_menlow_memory_remove()
204 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); in intel_menlow_memory_remove()
205 sysfs_remove_link(&cdev->device.kobj, "device"); in intel_menlow_memory_remove()
238 struct device *device; member
309 static ssize_t aux0_show(struct device *dev, in aux0_show()
321 static ssize_t aux1_show(struct device *dev, in aux1_show()
333 static ssize_t aux0_store(struct device *dev, in aux0_store()
352 static ssize_t aux1_store(struct device *dev, in aux1_store()
373 static ssize_t bios_enabled_show(struct device *dev, in bios_enabled_show()
387 void *store, struct device *dev, in intel_menlow_add_one_attribute()
402 attr->device = dev; in intel_menlow_add_one_attribute()
441 &thermal->device, handle); in intel_menlow_register_sensor()
455 &thermal->device, handle); in intel_menlow_register_sensor()
468 &thermal->device, handle); in intel_menlow_register_sensor()
491 device_remove_file(pos->device, &pos->attr); in intel_menlow_unregister_sensor()