[PATCH v7 0/5] firmware: add driver data API

From: Luis R. Rodriguez
Date: Tue May 02 2017 - 04:49:27 EST


On the v6 series [0] I got good amount of feedback from Luca and from
AKASHI Takahiro, who is picking up on the firmware signing work. In this
respin I've addressed their feedback, mostly to do away with redundant
checks while we can just proactively prevent certain situations, added
a int to the callbacks to enable us to propagate the exact reason for
failure, moved features (both exposed to driver and internal) from bool
to flags, split up a lot of data structures to be able to more properly
document them, shoved a lot of helper stuff I had on driver_data.h
into firmware_class.c as there was no point to expose these helpers to
drivers, and split out documentation into its own patch as requested.
The test driver script was adjusted in two test cases given we now get
the proper valid error code from an error :)

I also dropped the brcmfmac patch given Hans de Goede noted that the
nvram file is in fact not optional.

I've also ramped up the documentation a bit more, this time to refer to
the new data structures and the new functionality exported. This series
depends on the other series I just posted which moves the UMH lock stuff
to UMH-only code [1].

This and my previous series are available in git form on my linux-next
20170501-driver-data-try2 branch [2]. In case folks want to play with
a more stable tree I've rebased this and the prior series onto v4.11-rc8,
and is available on my linux v4.11-rc8-driver-data-try3 branch [3].

[0] https://lkml.kernel.org/r/20170330032514.17173-1-mcgrof@xxxxxxxxxx
[1] https://lkml.kernel.org/r/20170502083107.23418-1-mcgrof@xxxxxxxxxx
[2] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20170501-driver-data-try2
[3] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=v4.11-rc8-driver-data-try3

Luis R. Rodriguez (5):
firmware: add extensible driver data params
firmware: add extensible driver data API
test: add new driver_data load tester
firmware: document the extensible driver data API
iwlwifi: convert to use driver data API

Documentation/driver-api/firmware/driver_data.rst | 167 +++
Documentation/driver-api/firmware/index.rst | 1 +
Documentation/driver-api/firmware/introduction.rst | 16 +
.../driver-api/firmware/request_firmware.rst | 2 +
drivers/base/firmware_class.c | 741 ++++++++++--
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 91 +-
include/linux/driver_data.h | 260 ++++
include/linux/firmware.h | 2 +
lib/Kconfig.debug | 12 +
lib/Makefile | 1 +
lib/test_driver_data.c | 1270 ++++++++++++++++++++
tools/testing/selftests/firmware/Makefile | 2 +-
tools/testing/selftests/firmware/config | 1 +
tools/testing/selftests/firmware/driver_data.sh | 996 +++++++++++++++
15 files changed, 3430 insertions(+), 136 deletions(-)
create mode 100644 Documentation/driver-api/firmware/driver_data.rst
create mode 100644 include/linux/driver_data.h
create mode 100644 lib/test_driver_data.c
create mode 100755 tools/testing/selftests/firmware/driver_data.sh