summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/stb0899_drv.h
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2013-06-02 21:52:43 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-09 03:13:29 +0400
commit069ebbfc9eb7bef5e9780c508d8bc378bfea3e94 (patch)
tree2b342a89226fa90e7c14568ac0d702e4afb61695 /drivers/media/dvb-frontends/stb0899_drv.h
parentfa64cfd2fc8b66918e7889deeaec87d77fb96f89 (diff)
downloadlinux-069ebbfc9eb7bef5e9780c508d8bc378bfea3e94.tar.xz
[media] stb0899: fix inversion enum values to match usage with CFR
Throughout the zig-zag-implementations, inversion is taken into account when reading and writing the CFR register, which contains the derotator frequency. As swapping IQ signals changes the sign of that register for example, the idea is to compensate that sign change by multiplying the register value with the inversion enum value. The current enum values 0 and 1 for IQ_SWAP_OFF and IQ_SWAP_ON don't work in the case IQ_SWAP_OFF, due to the multiplication by zero (I've only found a single device which actually uses IQ_SWAP_OFF in it's config). I've changed the enum values to +1 and -1 to accommodate to the intended usage. Signed-off-by: Reinhard Nißl <rnissl@gmx.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/stb0899_drv.h')
-rw-r--r--drivers/media/dvb-frontends/stb0899_drv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/stb0899_drv.h b/drivers/media/dvb-frontends/stb0899_drv.h
index 1ddad6a8cc07..139264d19263 100644
--- a/drivers/media/dvb-frontends/stb0899_drv.h
+++ b/drivers/media/dvb-frontends/stb0899_drv.h
@@ -45,8 +45,8 @@ struct stb0899_s2_reg {
};
enum stb0899_inversion {
- IQ_SWAP_OFF = 0,
- IQ_SWAP_ON,
+ IQ_SWAP_OFF = +1, /* inversion affects the sign of e. g. */
+ IQ_SWAP_ON = -1, /* the derotator frequency register */
};
#define STB0899_GPIO00 0xf140