[media] dvb-frontends/cxd2841er: improved snr reporting
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 9 Apr 2017 19:38:24 +0000 (16:38 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 20 Jun 2017 12:56:51 +0000 (09:56 -0300)
commitdf61f828d4e5f6db7936a21afeef1d5cb6248b4b
treed496305f410104e6d9bfc4de7b39ef96deb34d97
parentbf51bbb0448e919181294c268a15a2d119ed9a4e
[media] dvb-frontends/cxd2841er: improved snr reporting

On DVB-T/T2 at least, SNR might be reported as >2500dB, which not only is
just wrong but also ridiculous, so fix this by improving the conversion
of the register value.

The INTLOG10X100 function/macro and the way the values are converted were
both taken from DD's cxd2843 driver.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Acked-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/cxd2841er.c