[media] m88rs2000: add m88rs2000_set_carrieroffset
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 24 Dec 2013 16:17:12 +0000 (13:17 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 11:35:58 +0000 (09:35 -0200)
commit06af15d1b6f45c60358feab88004472e5428f01c
tree57ec8127c9cb1a898951179a75d9ac7a0b8729b8
parent58f087c9b670ea7001d640fadbf7e4e91e739d6b
[media] m88rs2000: add m88rs2000_set_carrieroffset

Set the carrier offset correctly using the default mclk values.

Add function m88rs2000_get_mclk to calculate the mclk value
against crystal frequency which will later be used for
other functions.

Add function m88rs2000_set_carrieroffset to calculate
and set the offset value.

variable offset becomes a signed value.

Register 0x86 is set the appropriate value according to
remainder value of frequency % 192857 calculation as
shown.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: stable@vger.kernel.org # v3.9+
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/m88rs2000.c
drivers/media/dvb-frontends/m88rs2000.h