diff options
author | Istvan Varga <istvan_v@mailbox.hu> | 2011-06-04 12:25:19 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:52:39 -0300 |
commit | 7db98fe66be035494912b6b2c4e9c1e3abfedfe5 (patch) | |
tree | 11afb298f70be3722e3bbab6093da005f7c5bed5 | |
parent | 8f76afe8d737b9ecadc0097941c9ef1ece61af9e (diff) | |
download | blackbird-op-linux-7db98fe66be035494912b6b2c4e9c1e3abfedfe5.tar.gz blackbird-op-linux-7db98fe66be035494912b6b2c4e9c1e3abfedfe5.zip |
[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>
-rw-r--r-- | drivers/media/common/tuners/xc4000.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/xc4000.c b/drivers/media/common/tuners/xc4000.c index b04c73bab83c..160ca26286cc 100644 --- a/drivers/media/common/tuners/xc4000.c +++ b/drivers/media/common/tuners/xc4000.c @@ -140,7 +140,8 @@ struct xc4000_priv { /* Product id */ #define XC_PRODUCT_ID_FW_NOT_LOADED 0x2000 -#define XC_PRODUCT_ID_FW_LOADED 0x0FA0 +#define XC_PRODUCT_ID_XC4000 0x0FA0 +#define XC_PRODUCT_ID_XC4100 0x1004 /* Registers (Write-only) */ #define XREG_INIT 0x00 @@ -1071,7 +1072,9 @@ check_device: #endif /* Check that the tuner hardware model remains consistent over time. */ - if (priv->hwmodel == 0 && hwmodel == 4000) { + if (priv->hwmodel == 0 && + (hwmodel == XC_PRODUCT_ID_XC4000 || + hwmodel == XC_PRODUCT_ID_XC4100)) { priv->hwmodel = hwmodel; priv->hwvers = version & 0xff00; } else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel || @@ -1678,7 +1681,8 @@ struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe, } switch (id) { - case XC_PRODUCT_ID_FW_LOADED: + case XC_PRODUCT_ID_XC4000: + case XC_PRODUCT_ID_XC4100: printk(KERN_INFO "xc4000: Successfully identified at address 0x%02x\n", cfg->i2c_address); |