firmware_loader: Add sysfs nodes to monitor fw_upload
authorRuss Weight <russell.h.weight@intel.com>
Thu, 21 Apr 2022 21:22:01 +0000 (14:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 10:35:55 +0000 (12:35 +0200)
commit536fd8184b7dfa30e28e5b459e7c5c91c3a8063f
treec12a1f13db4d208578d753fa21f70dd371152059
parent97730bbb242cde22b7140acd202ffd88823886c9
firmware_loader: Add sysfs nodes to monitor fw_upload

Add additional sysfs nodes to monitor the transfer of firmware upload data
to the target device:

cancel: Write 1 to cancel the data transfer
error: Display error status for a failed firmware upload
remaining_size: Display the remaining amount of data to be transferred
status: Display the progress of the firmware upload

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Tianfei zhang <tianfei.zhang@intel.com>
Tested-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Link: https://lore.kernel.org/r/20220421212204.36052-6-russell.h.weight@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-class-firmware
Documentation/driver-api/firmware/fw_upload.rst
drivers/base/firmware_loader/sysfs.c
drivers/base/firmware_loader/sysfs_upload.c
drivers/base/firmware_loader/sysfs_upload.h