Commit f2e7af0b authored by Yasunari Takiguchi's avatar Yasunari Takiguchi Committed by Mauro Carvalho Chehab
Browse files

media: cxd2880:Optimized spi drive current and BER/PER set/get condition



This is the optimization for SPI drive current and
signal lock condition check part for BER/PER measure
to ensure BER/PER are stable

Signed-off-by: default avatarYasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: default avatarMasayuki Yamamoto <Masayuki.Yamamoto@sony.com>
Signed-off-by: default avatarHideki Nozawa <Hideki.Nozawa@sony.com>
Signed-off-by: default avatarKota Yonezawa <Kota.Yonezawa@sony.com>
Signed-off-by: default avatarToshihiko Matsumoto <Toshihiko.Matsumoto@sony.com>
Signed-off-by: default avatarSatoshi Watanabe <Satoshi.C.Watanabe@sony.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 447f0081
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -520,6 +520,15 @@ static int cxd2880_init(struct dvb_frontend *fe)
		pr_err("cxd2880 integ init failed %d\n", ret);
		return ret;
	}

	ret = cxd2880_tnrdmd_set_cfg(&priv->tnrdmd,
				     CXD2880_TNRDMD_CFG_TSPIN_CURRENT,
				     0x00);
	if (ret) {
		mutex_unlock(priv->spi_mutex);
		pr_err("cxd2880 set config failed %d\n", ret);
		return ret;
	}
	mutex_unlock(priv->spi_mutex);

	pr_debug("OK.\n");
@@ -1126,7 +1135,7 @@ static int cxd2880_get_stats(struct dvb_frontend *fe,
	priv = fe->demodulator_priv;
	c = &fe->dtv_property_cache;

	if (!(status & FE_HAS_LOCK)) {
	if (!(status & FE_HAS_LOCK) || !(status & FE_HAS_CARRIER)) {
		c->pre_bit_error.len = 1;
		c->pre_bit_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
		c->pre_bit_count.len = 1;
@@ -1345,7 +1354,8 @@ static int cxd2880_read_status(struct dvb_frontend *fe,

	pr_debug("status %d\n", *status);

	if (priv->s == 0 && (*status & FE_HAS_LOCK)) {
	if (priv->s == 0 && (*status & FE_HAS_LOCK) &&
	    (*status & FE_HAS_CARRIER)) {
		mutex_lock(priv->spi_mutex);
		if (c->delivery_system == SYS_DVBT) {
			ret = cxd2880_set_ber_per_period_t(fe);