{
struct af9013_state *state = fe->demodulator_priv;
struct i2c_client *client = state->client;
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int ret, i, len;
unsigned int utmp;
u8 buf[3];
}
state->snr = utmp * 10; /* dB/10 */
+ c->cnr.stat[0].svalue = 1000 * utmp;
+ c->cnr.stat[0].scale = FE_SCALE_DECIBEL;
+
return 0;
err:
dev_dbg(&client->dev, "failed %d\n", ret);
{
struct af9013_state *state;
struct af9013_platform_data *pdata = client->dev.platform_data;
+ struct dtv_frontend_properties *c;
int ret, i;
u8 firmware_version[4];
static const struct regmap_bus regmap_bus = {
/* Setup callbacks */
pdata->get_dvb_frontend = af9013_get_dvb_frontend;
+ /* Init stats to indicate which stats are supported */
+ c = &state->fe.dtv_property_cache;
+ c->cnr.len = 1;
+
dev_info(&client->dev, "Afatech AF9013 successfully attached\n");
dev_info(&client->dev, "firmware version: %d.%d.%d.%d\n",
firmware_version[0], firmware_version[1],