Skip to content

Commit 7db98fe

Browse files
istvan-vMauro Carvalho Chehab
authored andcommitted
[media] xc4000: detect also xc4100
Added code to detect the XC4100 chip, which is presumably an analog-only "value" version of the XC4000. It is not sure, however, if any devices using this have actually been produced and sold, so the patch may be unneeded. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 8f76afe commit 7db98fe

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎drivers/media/common/tuners/xc4000.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ struct xc4000_priv {
140140

141141
/* Product id */
142142
#define XC_PRODUCT_ID_FW_NOT_LOADED 0x2000
143-
#define XC_PRODUCT_ID_FW_LOADED 0x0FA0
143+
#define XC_PRODUCT_ID_XC4000 0x0FA0
144+
#define XC_PRODUCT_ID_XC4100 0x1004
144145

145146
/* Registers (Write-only) */
146147
#define XREG_INIT 0x00
@@ -1071,7 +1072,9 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
10711072
#endif
10721073

10731074
/* Check that the tuner hardware model remains consistent over time. */
1074-
if (priv->hwmodel == 0 && hwmodel == 4000) {
1075+
if (priv->hwmodel == 0 &&
1076+
(hwmodel == XC_PRODUCT_ID_XC4000 ||
1077+
hwmodel == XC_PRODUCT_ID_XC4100)) {
10751078
priv->hwmodel = hwmodel;
10761079
priv->hwvers = version & 0xff00;
10771080
} else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel ||
@@ -1678,7 +1681,8 @@ struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe,
16781681
}
16791682

16801683
switch (id) {
1681-
case XC_PRODUCT_ID_FW_LOADED:
1684+
case XC_PRODUCT_ID_XC4000:
1685+
case XC_PRODUCT_ID_XC4100:
16821686
printk(KERN_INFO
16831687
"xc4000: Successfully identified at address 0x%02x\n",
16841688
cfg->i2c_address);

0 commit comments

Comments
 (0)