Lines Matching full:fan
3 * fan_attr.c - Create extra attributes for ACPI Fan driver
15 #include "fan.h"
68 struct acpi_fan *fan = acpi_driver_data(acpi_dev); in show_fine_grain_control() local
70 return sprintf(buf, "%d\n", fan->fif.fine_grain_ctrl); in show_fine_grain_control()
75 struct acpi_fan *fan = acpi_driver_data(device); in acpi_fan_create_attributes() local
78 sysfs_attr_init(&fan->fine_grain_control.attr); in acpi_fan_create_attributes()
79 fan->fine_grain_control.show = show_fine_grain_control; in acpi_fan_create_attributes()
80 fan->fine_grain_control.store = NULL; in acpi_fan_create_attributes()
81 fan->fine_grain_control.attr.name = "fine_grain_control"; in acpi_fan_create_attributes()
82 fan->fine_grain_control.attr.mode = 0444; in acpi_fan_create_attributes()
83 status = sysfs_create_file(&device->dev.kobj, &fan->fine_grain_control.attr); in acpi_fan_create_attributes()
88 sysfs_attr_init(&fan->fst_speed.attr); in acpi_fan_create_attributes()
89 fan->fst_speed.show = show_fan_speed; in acpi_fan_create_attributes()
90 fan->fst_speed.store = NULL; in acpi_fan_create_attributes()
91 fan->fst_speed.attr.name = "fan_speed_rpm"; in acpi_fan_create_attributes()
92 fan->fst_speed.attr.mode = 0444; in acpi_fan_create_attributes()
93 status = sysfs_create_file(&device->dev.kobj, &fan->fst_speed.attr); in acpi_fan_create_attributes()
97 for (i = 0; i < fan->fps_count; ++i) { in acpi_fan_create_attributes()
98 struct acpi_fan_fps *fps = &fan->fps[i]; in acpi_fan_create_attributes()
111 sysfs_remove_file(&device->dev.kobj, &fan->fps[j].dev_attr.attr); in acpi_fan_create_attributes()
119 sysfs_remove_file(&device->dev.kobj, &fan->fst_speed.attr); in acpi_fan_create_attributes()
122 sysfs_remove_file(&device->dev.kobj, &fan->fine_grain_control.attr); in acpi_fan_create_attributes()
129 struct acpi_fan *fan = acpi_driver_data(device); in acpi_fan_delete_attributes() local
132 for (i = 0; i < fan->fps_count; ++i) in acpi_fan_delete_attributes()
133 sysfs_remove_file(&device->dev.kobj, &fan->fps[i].dev_attr.attr); in acpi_fan_delete_attributes()
135 sysfs_remove_file(&device->dev.kobj, &fan->fst_speed.attr); in acpi_fan_delete_attributes()
136 sysfs_remove_file(&device->dev.kobj, &fan->fine_grain_control.attr); in acpi_fan_delete_attributes()