m88rs2000: add m88rs2000_set_carrieroffset
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 24 Dec 2013 16:17:12 +0000 (13:17 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:48:02 +0000 (13:48 -0800)
commitcf5b0cc26c7aff4bb8cbf0f5f411ce2249acc7e2
treefdb7f70849ce1d7dd2c5f911cf1011822f86f5dc
parent427f7ae89d26e64849063c134d0292f2228995e9
m88rs2000: add m88rs2000_set_carrieroffset

commit 06af15d1b6f45c60358feab88004472e5428f01c upstream.

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>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-frontends/m88rs2000.c
drivers/media/dvb-frontends/m88rs2000.h