ACPI / PM: LPIT: Register sysfs attributes based on FADT
authorRajneesh Bhardwaj <rajneesh.bhardwaj@linux.intel.com>
Fri, 28 Sep 2018 08:54:02 +0000 (14:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:24 +0000 (11:08 -0800)
commitec25ba44807bcebd436148cbe246291a9ec32e48
tree0b9839e2cd6d6caf8c442367797fb77ec1b7c569
parent0deec59610205886cd9f624117b8198a1f709e0b
ACPI / PM: LPIT: Register sysfs attributes based on FADT

[ Upstream commit 1cdda9486f5103fb133f88e662e48c504adbb779 ]

ACPI Low Power S0 Idle capabilities are announced via FADT table and can
be used to inform the kernel about the presence of one or more Low Power
Idle (LPI) entries as descried in LPIT table. LPIT table can exist
independently even if the FADT S0 Idle flag is not set and thus it could
confuse user since the following cpuidle attributes are created.

/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us

Presence or absence of above attributes could mean that the given
platform supports S0ix state or not.

This change allows to create the above cpuidle attributes only if
FADT table supports Low Power S0 Idle.

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/acpi_lpit.c