platform/x86/intel/tpmi: Read feature control status
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 12 Jul 2023 22:59:48 +0000 (15:59 -0700)
committerHans de Goede <hdegoede@redhat.com>
Fri, 14 Jul 2023 13:24:45 +0000 (15:24 +0200)
commit61457949686fc4472e6136c72c255b4ad003e084
tree779216a832b9c8eebe1b24ec7a842cca88097f67
parent2dd074c405d4c7bcdf97619c079b345021164109
platform/x86/intel/tpmi: Read feature control status

Some of the PM features can be locked or disabled. In that case, write
interface can be locked.

This status is read via a mailbox. There is one TPMI ID which provides
base address for interface and data register for mail box operation.
The mailbox operations is defined in the TPMI specification. Refer to
https://github.com/intel/tpmi_power_management/ for TPMI specifications.

An API is exposed to feature drivers to read feature control status.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230712225950.171326-2-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/tpmi.c
include/linux/intel_tpmi.h