si2157.c (191a66353b22fad8ac89404ab4c929cbe7b0afb2) si2157.c (ee3c3e46885946cc041f08ec68e7c5b91b087cbe)
1/*
2 * Silicon Labs Si2146/2147/2148/2157/2158 silicon tuner driver
3 *
4 * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 284 unchanged lines hidden (view full) ---

293 cmd.rlen = 4;
294 ret = si2157_cmd_execute(client, &cmd);
295 if (ret)
296 goto err;
297
298 if (dev->chiptype == SI2157_CHIPTYPE_SI2146)
299 memcpy(cmd.args, "\x14\x00\x02\x07\x00\x01", 6);
300 else
1/*
2 * Silicon Labs Si2146/2147/2148/2157/2158 silicon tuner driver
3 *
4 * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

--- 284 unchanged lines hidden (view full) ---

293 cmd.rlen = 4;
294 ret = si2157_cmd_execute(client, &cmd);
295 if (ret)
296 goto err;
297
298 if (dev->chiptype == SI2157_CHIPTYPE_SI2146)
299 memcpy(cmd.args, "\x14\x00\x02\x07\x00\x01", 6);
300 else
301 memcpy(cmd.args, "\x14\x00\x02\x07\x01\x00", 6);
301 memcpy(cmd.args, "\x14\x00\x02\x07\x00\x00", 6);
302 cmd.args[4] = dev->if_port;
302 cmd.wlen = 6;
303 cmd.rlen = 4;
304 ret = si2157_cmd_execute(client, &cmd);
305 if (ret)
306 goto err;
307
308 /* set if frequency if needed */
309 if (if_frequency != dev->if_frequency) {

--- 63 unchanged lines hidden (view full) ---

373 ret = -ENOMEM;
374 dev_err(&client->dev, "kzalloc() failed\n");
375 goto err;
376 }
377
378 i2c_set_clientdata(client, dev);
379 dev->fe = cfg->fe;
380 dev->inversion = cfg->inversion;
303 cmd.wlen = 6;
304 cmd.rlen = 4;
305 ret = si2157_cmd_execute(client, &cmd);
306 if (ret)
307 goto err;
308
309 /* set if frequency if needed */
310 if (if_frequency != dev->if_frequency) {

--- 63 unchanged lines hidden (view full) ---

374 ret = -ENOMEM;
375 dev_err(&client->dev, "kzalloc() failed\n");
376 goto err;
377 }
378
379 i2c_set_clientdata(client, dev);
380 dev->fe = cfg->fe;
381 dev->inversion = cfg->inversion;
382 dev->if_port = cfg->if_port;
381 dev->fw_loaded = false;
382 dev->chiptype = (u8)id->driver_data;
383 dev->if_frequency = 5000000; /* default value of property 0x0706 */
384 mutex_init(&dev->i2c_mutex);
385
386 /* check if the tuner is there */
387 cmd.wlen = 0;
388 cmd.rlen = 1;

--- 57 unchanged lines hidden ---
383 dev->fw_loaded = false;
384 dev->chiptype = (u8)id->driver_data;
385 dev->if_frequency = 5000000; /* default value of property 0x0706 */
386 mutex_init(&dev->i2c_mutex);
387
388 /* check if the tuner is there */
389 cmd.wlen = 0;
390 cmd.rlen = 1;

--- 57 unchanged lines hidden ---