@@ -445,6 +445,9 @@ static int si2168_init(struct dvb_frontend *fe)
if (ret)
goto err;
+ if (dev->dont_load_firmware)
+ goto dont_load;
+
/* request the firmware, this will block and timeout */
ret = request_firmware(&fw, dev->firmware_name, &client->dev);
if (ret) {
@@ -504,6 +507,7 @@ static int si2168_init(struct dvb_frontend *fe)
release_firmware(fw);
+dont_load:
cmd_init(&cmd, "\x01\x01", 2, 1);
ret = si2168_cmd_execute(client, &cmd);
if (ret)
@@ -749,6 +753,7 @@ static int si2168_probe(struct i2c_client *client,
dev->ts_clock_inv = config->ts_clock_inv;
dev->ts_clock_gapped = config->ts_clock_gapped;
dev->spectral_inversion = config->spectral_inversion;
+ dev->dont_load_firmware = config->dont_load_firmware;
dev_info(&client->dev, "Silicon Labs Si2168-%c%d%d successfully identified\n",
dev->version >> 24 & 0xff, dev->version >> 16 & 0xff,
@@ -28,6 +28,8 @@
* TS clock gapped
* @spectral_inversion:
* Inverted spectrum
+ * @dont_load_firmware:
+ * Instead of uploading a new firmware, use the existing one
*
* Note:
* The I2C address of this demod is 0x64.
@@ -46,6 +48,7 @@ struct si2168_config {
unsigned int ts_clock_inv:1;
unsigned int ts_clock_gapped:1;
unsigned int spectral_inversion:1;
+ unsigned int dont_load_firmware:1;
};
#endif
@@ -40,6 +40,7 @@ struct si2168_dev {
unsigned int ts_clock_inv:1;
unsigned int ts_clock_gapped:1;
unsigned int spectral_inversion:1;
+ unsigned int dont_load_firmware:1;
};
/* firmware command struct */
Some devices (Logilink VG0022A) don't work properly with the standard firmware. Upgrading the firmware makes I2C transfers to fail when talking to the tuner. While we don't have a better alternative, add support to disable the firmware load on such devices. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> --- drivers/media/dvb-frontends/si2168.c | 5 +++++ drivers/media/dvb-frontends/si2168.h | 3 +++ drivers/media/dvb-frontends/si2168_priv.h | 1 + 3 files changed, 9 insertions(+)