Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 
0003 /*
0004  * ACPI fan device IDs are shared between the fan driver and the device power
0005  * management code.
0006  *
0007  * Add new device IDs before the generic ACPI fan one.
0008  */
0009 
0010 #ifndef _ACPI_FAN_H_
0011 #define _ACPI_FAN_H_
0012 
0013 #define ACPI_FAN_DEVICE_IDS \
0014     {"INT3404", }, /* Fan */ \
0015     {"INTC1044", }, /* Fan for Tiger Lake generation */ \
0016     {"INTC1048", }, /* Fan for Alder Lake generation */ \
0017     {"INTC1063", }, /* Fan for Meteor Lake generation */ \
0018     {"INTC10A2", }, /* Fan for Raptor Lake generation */ \
0019     {"PNP0C0B", } /* Generic ACPI fan */
0020 
0021 #define ACPI_FPS_NAME_LEN   20
0022 
0023 struct acpi_fan_fps {
0024     u64 control;
0025     u64 trip_point;
0026     u64 speed;
0027     u64 noise_level;
0028     u64 power;
0029     char name[ACPI_FPS_NAME_LEN];
0030     struct device_attribute dev_attr;
0031 };
0032 
0033 struct acpi_fan_fif {
0034     u8 revision;
0035     u8 fine_grain_ctrl;
0036     u8 step_size;
0037     u8 low_speed_notification;
0038 };
0039 
0040 struct acpi_fan_fst {
0041     u64 revision;
0042     u64 control;
0043     u64 speed;
0044 };
0045 
0046 struct acpi_fan {
0047     bool acpi4;
0048     struct acpi_fan_fif fif;
0049     struct acpi_fan_fps *fps;
0050     int fps_count;
0051     struct thermal_cooling_device *cdev;
0052     struct device_attribute fst_speed;
0053     struct device_attribute fine_grain_control;
0054 };
0055 
0056 int acpi_fan_get_fst(struct acpi_device *device, struct acpi_fan_fst *fst);
0057 int acpi_fan_create_attributes(struct acpi_device *device);
0058 void acpi_fan_delete_attributes(struct acpi_device *device);
0059 #endif