]> www.infradead.org Git - users/jedix/linux-maple.git/commit
HID: intel-ish-hid: Add firmware version sysfs attributes
authorZhang Lixu <lixu.zhang@intel.com>
Wed, 9 Oct 2024 01:10:23 +0000 (09:10 +0800)
committerJiri Kosina <jkosina@suse.com>
Fri, 11 Oct 2024 11:17:01 +0000 (13:17 +0200)
commitac0cba683772991b1100e2b26065c188e00a46fe
treecd0cb574ce7ddcfa2ec5249d273ce70963159172
parent63cafaf47a834fa15d80238f9d8181d32931be17
HID: intel-ish-hid: Add firmware version sysfs attributes

Introduce sysfs attributes to the intel-ish-ipc driver to expose the base
and project firmware versions for ISH devices that load firmware from the
host.

The build tool embeds these versions into the ISH global manifest within
the firmware binary during the firmware build process. The driver, upon
loading the firmware, extracts this version information from the manifest
and makes it accessible via sysfs. The base version corresponds to the
firmware version provided in Intel's Firmware Development Kit (FDK), while
the project version reflects the vendor-customized firmware derived from
the FDK.

These attributes provide userspace tools and applications with the
ability to easily query the firmware versions, which is essential for
firmware validation and troubleshooting.

Example usages:
  $ cat /sys/devices/pci0000\:00/0000\:00\:12.0/firmware/base_version
  5.8.0.7716

  $ cat /sys/devices/pci0000\:00/0000\:00\:12.0/firmware/project_version
  5.8.0.12472

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/intel-ish-hid/ipc/pci-ish.c
drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h
drivers/hid/intel-ish-hid/ishtp/loader.c
drivers/hid/intel-ish-hid/ishtp/loader.h