]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86/intel/pmt: Add pre/post decode hooks around header parsing
authorDavid E. Box <david.e.box@linux.intel.com>
Fri, 12 Jun 2026 21:01:42 +0000 (14:01 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Sun, 14 Jun 2026 23:12:52 +0000 (02:12 +0300)
commitacd3b94f8604aeee2b62f8fd18e95a0474546288
tree773b474f8291de4d3c10bd0cc71ab70e4459504b
parent3429ae7b2f02a4a6ad40d36ee06641d433d75a1b
platform/x86/intel/pmt: Add pre/post decode hooks around header parsing

Add optional pre- and post-decode callbacks to the PMT class so namespaces
can perform setup and cleanup steps around header parsing.

  - Add pmt_pre_decode() and pmt_post_decode() to struct
    intel_pmt_namespace.
  - Update intel_pmt_dev_create() to invoke, in order:
      pre → header_decode() → post.
  - Keep the existing pmt_header_decode() callback unchanged.

No functional changes. This adds flexibility for upcoming decoders while
preserving current behavior.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/b178a341601ca694db99c3b738fe4ed9e0c2bede.1781294741.git.david.e.box@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/pmt/class.c
drivers/platform/x86/intel/pmt/class.h