Merge tag 'acpi-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-block.git] / drivers / acpi / fan.h
CommitLineData
b9370dce
RW
1/* SPDX-License-Identifier: GPL-2.0-only */
2
3/*
4 * ACPI fan device IDs are shared between the fan driver and the device power
5 * management code.
6 *
7 * Add new device IDs before the generic ACPI fan one.
8 */
00ae053a
SP
9
10#ifndef _ACPI_FAN_H_
11#define _ACPI_FAN_H_
12
b9370dce
RW
13#define ACPI_FAN_DEVICE_IDS \
14 {"INT3404", }, /* Fan */ \
15 {"INTC1044", }, /* Fan for Tiger Lake generation */ \
16 {"INTC1048", }, /* Fan for Alder Lake generation */ \
657b95d3 17 {"INTC1063", }, /* Fan for Meteor Lake generation */ \
79b510c4 18 {"INTC106A", }, /* Fan for Lunar Lake generation */ \
a510c78e 19 {"INTC10A2", }, /* Fan for Raptor Lake generation */ \
b9370dce 20 {"PNP0C0B", } /* Generic ACPI fan */
00ae053a
SP
21
22#define ACPI_FPS_NAME_LEN 20
23
24struct acpi_fan_fps {
25 u64 control;
26 u64 trip_point;
27 u64 speed;
28 u64 noise_level;
29 u64 power;
30 char name[ACPI_FPS_NAME_LEN];
31 struct device_attribute dev_attr;
32};
33
34struct acpi_fan_fif {
d445571f
SP
35 u8 revision;
36 u8 fine_grain_ctrl;
37 u8 step_size;
38 u8 low_speed_notification;
00ae053a
SP
39};
40
bea2d986
SP
41struct acpi_fan_fst {
42 u64 revision;
43 u64 control;
44 u64 speed;
45};
46
00ae053a
SP
47struct acpi_fan {
48 bool acpi4;
49 struct acpi_fan_fif fif;
50 struct acpi_fan_fps *fps;
51 int fps_count;
52 struct thermal_cooling_device *cdev;
f1197343
SP
53 struct device_attribute fst_speed;
54 struct device_attribute fine_grain_control;
00ae053a
SP
55};
56
f1197343 57int acpi_fan_get_fst(struct acpi_device *device, struct acpi_fan_fst *fst);
00ae053a
SP
58int acpi_fan_create_attributes(struct acpi_device *device);
59void acpi_fan_delete_attributes(struct acpi_device *device);
60#endif