Commit 24b2b094 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-ec', 'acpi-cppc', 'acpi-fan' and 'acpi-battery'

Merge ACPI EC driver changes, CPPC-related changes, ACPI fan driver
changes and ACPI battery driver changes for 5.18-rc1:

 - Make wakeup events checks in the ACPI EC driver more
   straightforward and clean up acpi_ec_submit_event() (Rafael
   Wysocki).

 - Make it possible to obtain the CPU capacity with the help of CPPC
   information (Ionela Voinescu).

 - Improve fine grained fan control in the ACPI fan driver and
   document it (Srinivas Pandruvada).

 - Add device HID and quirk for Microsoft Surface Go 3 to the ACPI
   battery driver (Maximilian Luz).

* acpi-ec:
  ACPI: EC: Rearrange code in acpi_ec_submit_event()
  ACPI: EC: Reduce indentation level in acpi_ec_submit_event()
  ACPI: EC: Do not return result from advance_transaction()

* acpi-cppc:
  arm64, topology: enable use of init_cpu_capacity_cppc()
  arch_topology: obtain cpu capacity using information from CPPC
  x86, ACPI: rename init_freq_invariance_cppc() to arch_init_invariance_cppc()

* acpi-fan:
  Documentation/admin-guide/acpi: Add documentation for fine grain control
  ACPI: fan: Add additional attributes for fine grain control
  ACPI: fan: Properly handle fine grain control
  ACPI: fan: Optimize struct acpi_fan_fif
  ACPI: fan: Separate file for attributes creation
  ACPI: fan: Fix error reporting to user space

* acpi-battery:
  ACPI: battery: Add device HID and quirk for Microsoft Surface Go 3
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -60,3 +60,31 @@ For example::

When a given field is not populated or its value provided by the platform
firmware is invalid, the "not-defined" string is shown instead of the value.

ACPI Fan Fine Grain Control
=============================

When _FIF object specifies support for fine grain control, then fan speed
can be set from 0 to 100% with the recommended minimum "step size" via
_FSL object. User can adjust fan speed using thermal sysfs cooling device.

Here use can look at fan performance states for a reference speed (speed_rpm)
and set it by changing cooling device cur_state. If the fine grain control
is supported then user can also adjust to some other speeds which are
not defined in the performance states.

The support of fine grain control is presented via sysfs attribute
"fine_grain_control". If fine grain control is present, this attribute
will show "1" otherwise "0".

This sysfs attribute is presented in the same directory as performance states.

ACPI Fan Performance Feedback
=============================

The optional _FST object provides status information for the fan device.
This includes field to provide current fan speed in revolutions per minute
at which the fan is rotating.

This speed is presented in the sysfs using the attribute "fan_speed_rpm",
in the same directory as performance states.
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@ void update_freq_counters_refs(void);
#define arch_scale_freq_capacity topology_get_freq_scale
#define arch_scale_freq_invariant topology_scale_freq_invariant

#ifdef CONFIG_ACPI_CPPC_LIB
#define arch_init_invariance_cppc topology_init_cpu_capacity_cppc
#endif

/* Replace task scheduler's default cpu-invariant accounting */
#define arch_scale_cpu_capacity topology_get_cpu_scale

+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ static inline void init_freq_invariance(bool secondary, bool cppc_ready)

#ifdef CONFIG_ACPI_CPPC_LIB
void init_freq_invariance_cppc(void);
#define init_freq_invariance_cppc init_freq_invariance_cppc
#define arch_init_invariance_cppc init_freq_invariance_cppc

bool amd_set_max_freq_ratio(u64 *ratio);
#else
+3 −0
Original line number Diff line number Diff line
@@ -81,6 +81,9 @@ obj-$(CONFIG_ACPI_AC) += ac.o
obj-$(CONFIG_ACPI_BUTTON)	+= button.o
obj-$(CONFIG_ACPI_TINY_POWER_BUTTON)	+= tiny-power-button.o
obj-$(CONFIG_ACPI_FAN)		+= fan.o
fan-objs			:= fan_core.o
fan-objs			+= fan_attr.o

obj-$(CONFIG_ACPI_VIDEO)	+= video.o
obj-$(CONFIG_ACPI_TAD)		+= acpi_tad.o
obj-$(CONFIG_ACPI_PCI_SLOT)	+= pci_slot.o
+12 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");

static const struct acpi_device_id battery_device_ids[] = {
	{"PNP0C0A", 0},

	/* Microsoft Surface Go 3 */
	{"MSHW0146", 0},

	{"", 0},
};

@@ -1148,6 +1152,14 @@ static const struct dmi_system_id bat_dmi_table[] __initconst = {
			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad"),
		},
	},
	{
		/* Microsoft Surface Go 3 */
		.callback = battery_notification_delay_quirk,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
		},
	},
	{},
};

Loading