aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2024-05-31 01:35:48 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-05-31 16:24:45 +0300
commit2f9514f005530502452c34295e77bdfb395b5bc6 (patch)
tree05ab240d654479fafbd2b84f54d3fb976b1e3366
parentplatform/x86: ISST: Avoid some SkyLake server models (diff)
downloadwireguard-linux-2f9514f005530502452c34295e77bdfb395b5bc6.tar.xz
wireguard-linux-2f9514f005530502452c34295e77bdfb395b5bc6.zip
platform/x86: ISST: Use only TPMI interface when present
When the TPMI interface is present, use this interface instead of legacy. On some systems legacy IO device is also present. Using both interfaces together is confusing and may set the hardware in inconsistent state. When TPMI interface is present, don't load legacy drivers. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20240531083554.1313110-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
-rw-r--r--drivers/platform/x86/intel/speed_select_if/isst_if_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
index 7ea058571ab5..10e21563fa46 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
@@ -775,6 +775,9 @@ int isst_if_cdev_register(int device_type, struct isst_if_cmd_cb *cb)
if (device_type >= ISST_IF_DEV_MAX)
return -EINVAL;
+ if (device_type < ISST_IF_DEV_TPMI && isst_hpm_support)
+ return -ENODEV;
+
mutex_lock(&punit_misc_dev_open_lock);
/* Device is already open, we don't want to add new callbacks */
if (misc_device_open) {