summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-03-07 23:22:52 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 23:01:58 +0100
commit70375ecc452128d855f89e04b31a0961501cc153 (patch)
tree276e927e0f7820956895bbd4e67728fb5399eb10 /drivers/media/usb/dvb-usb-v2
parent[media] af9035: enable remote controller for IT9135 too (diff)
downloadlinux-70375ecc452128d855f89e04b31a0961501cc153.tar.xz
linux-70375ecc452128d855f89e04b31a0961501cc153.zip
[media] af9035: change dual mode boolean to bit field
For some reason there seems to be value 0x03 in eeprom for dual mode (and 0x00 for single mode). Boolean is not always 1 bit wide - it could be 8 bit wide too. Storing number 0x03 to boolean causes driver to thing there is 4 tuners in some cases :o Add also some comments regarding to eeprom. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2')
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h
index 2f7d269c7d60..0f42b6cb3708 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.h
+++ b/drivers/media/usb/dvb-usb-v2/af9035.h
@@ -59,7 +59,7 @@ struct state {
u8 prechip_version;
u8 chip_version;
u16 chip_type;
- bool dual_mode;
+ u8 dual_mode:1;
u16 eeprom_addr;
struct af9033_config af9033_config[2];
};
@@ -96,6 +96,14 @@ static const u32 clock_lut_it9135[] = {
#define AF9035_FIRMWARE_IT9135_V1 "dvb-usb-it9135-01.fw"
#define AF9035_FIRMWARE_IT9135_V2 "dvb-usb-it9135-02.fw"
+/*
+ * eeprom is memory mapped as read only. Writing that memory mapped address
+ * will not corrupt eeprom.
+ *
+ * eeprom has value 0x00 single mode and 0x03 for dual mode as far as I have
+ * seen to this day.
+ */
+
#define EEPROM_BASE_AF9035 0x42fd
#define EEPROM_BASE_IT9135 0x499c
#define EEPROM_SHIFT 0x10