Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86/intel/tpmi: Add API to get debugfs root

Add new API to get the debugfs root directory for TPMI. This allows any
TPMI devices to add their own debugfs items under the same directory
structure.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Link: https://lore.kernel.org/r/20240527133400.483634-3-tero.kristo@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Tero Kristo and committed by
Ilpo Järvinen
d36842ba b44d79d6

+10
+9
drivers/platform/x86/intel/tpmi.c
··· 357 357 } 358 358 EXPORT_SYMBOL_NS_GPL(tpmi_get_feature_status, INTEL_TPMI); 359 359 360 + struct dentry *tpmi_get_debugfs_dir(struct auxiliary_device *auxdev) 361 + { 362 + struct intel_vsec_device *intel_vsec_dev = dev_to_ivdev(auxdev->dev.parent); 363 + struct intel_tpmi_info *tpmi_info = auxiliary_get_drvdata(&intel_vsec_dev->auxdev); 364 + 365 + return tpmi_info->dbgfs_dir; 366 + } 367 + EXPORT_SYMBOL_NS_GPL(tpmi_get_debugfs_dir, INTEL_TPMI); 368 + 360 369 static int tpmi_pfs_dbg_show(struct seq_file *s, void *unused) 361 370 { 362 371 struct intel_tpmi_info *tpmi_info = s->private;
+1
include/linux/intel_tpmi.h
··· 54 54 int tpmi_get_resource_count(struct auxiliary_device *auxdev); 55 55 int tpmi_get_feature_status(struct auxiliary_device *auxdev, int feature_id, bool *read_blocked, 56 56 bool *write_blocked); 57 + struct dentry *tpmi_get_debugfs_dir(struct auxiliary_device *auxdev); 57 58 #endif