aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/firmware_loader/sysfs_upload.h
AgeCommit message (Collapse)AuthorFilesLines
2022-04-29firmware_loader: Move definitions from sysfs_upload.h to sysfs.hRuss Weight1-18/+5
Move definitions required by sysfs.c from sysfs_upload.h to sysfs.h so that sysfs.c does not need to include sysfs_upload.h. Signed-off-by: Russ Weight <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-04-26firmware_loader: Add sysfs nodes to monitor fw_uploadRuss Weight1-0/+5
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 <[email protected]> Reviewed-by: Tianfei zhang <[email protected]> Tested-by: Matthew Gerlach <[email protected]> Signed-off-by: Russ Weight <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-04-26firmware_loader: Add firmware-upload supportRuss Weight1-0/+49
Extend the firmware subsystem to support a persistent sysfs interface that userspace may use to initiate a firmware update. For example, FPGA based PCIe cards load firmware and FPGA images from local FLASH when the card boots. The images in FLASH may be updated with new images provided by the user at his/her convenience. A device driver may call firmware_upload_register() to expose persistent "loading" and "data" sysfs files. These files are used in the same way as the fallback sysfs "loading" and "data" files. When 0 is written to "loading" to complete the write of firmware data, the data is transferred to the lower-level driver using pre-registered call-back functions. The data transfer is done in the context of a kernel worker thread. Reviewed-by: Luis Chamberlain <[email protected]> Reviewed-by: Tianfei zhang <[email protected]> Tested-by: Matthew Gerlach <[email protected]> Signed-off-by: Russ Weight <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>