media: si2157: Add optional firmware download
authorRobert Schlabbach <robert_s@gmx.net>
Wed, 1 Dec 2021 21:10:58 +0000 (22:10 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Dec 2021 15:19:04 +0000 (16:19 +0100)
commit48dde945e7f856f622bd68c076f8a6b5d524d19e
tree5dd7ed2178b5e1b2e915fd171e5959f35b4a8897
parent2ae5d7e5416982c585a8b8d9d330501a4fbc6c10
media: si2157: Add optional firmware download

The Si2157 (A30) is functional with the ROM firmware 3.0.5, but can also
be patched at runtime, e.g. to firmware 3.1.3. However, although a
firmware filename for its firmware patch exists, that has only been used
for the Si2177 (A30) so far (which indeed takes the binary identical
firmware patch).

Add support for downloading firmware patches into the Si2157 (A30), but
make it optional, so that initialization can succeed with and without a
firmware patch being available. Keep the use of request_firmware() for
this purpose rather than firmware_request_nowarn(), so that the warning
in the log makes users aware that it is possible to provide a firmware
for this tuner.

The firmware patch is probably also optional for other (if not all)
tuners supported by the driver, but since I do not have the others
available to test, they are kept mandatory for now to avoid regressions.

Signed-off-by: Robert Schlabbach <robert_s@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/tuners/si2157.c