diff options
author | Istvan Varga <istvan_v@mailbox.hu> | 2011-06-04 11:25:19 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:52:39 -0400 |
commit | 7db98fe66be035494912b6b2c4e9c1e3abfedfe5 (patch) | |
tree | 11afb298f70be3722e3bbab6093da005f7c5bed5 /drivers/media/common | |
parent | 8f76afe8d737b9ecadc0097941c9ef1ece61af9e (diff) |
[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>
Diffstat (limited to 'drivers/media/common')
-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 b04c73bab83..160ca26286c 100644 --- a/drivers/media/common/tuners/xc4000.c +++ b/drivers/media/common/tuners/xc4000.c | |||
@@ -140,7 +140,8 @@ struct xc4000_priv { | |||
140 | 140 | ||
141 | /* Product id */ | 141 | /* Product id */ |
142 | #define XC_PRODUCT_ID_FW_NOT_LOADED 0x2000 | 142 | #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 | ||
144 | 145 | ||
145 | /* Registers (Write-only) */ | 146 | /* Registers (Write-only) */ |
146 | #define XREG_INIT 0x00 | 147 | #define XREG_INIT 0x00 |
@@ -1071,7 +1072,9 @@ check_device: | |||
1071 | #endif | 1072 | #endif |
1072 | 1073 | ||
1073 | /* Check that the tuner hardware model remains consistent over time. */ | 1074 | /* 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)) { | ||
1075 | priv->hwmodel = hwmodel; | 1078 | priv->hwmodel = hwmodel; |
1076 | priv->hwvers = version & 0xff00; | 1079 | priv->hwvers = version & 0xff00; |
1077 | } else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel || | 1080 | } else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel || |
@@ -1678,7 +1681,8 @@ struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe, | |||
1678 | } | 1681 | } |
1679 | 1682 | ||
1680 | switch (id) { | 1683 | switch (id) { |
1681 | case XC_PRODUCT_ID_FW_LOADED: | 1684 | case XC_PRODUCT_ID_XC4000: |
1685 | case XC_PRODUCT_ID_XC4100: | ||
1682 | printk(KERN_INFO | 1686 | printk(KERN_INFO |
1683 | "xc4000: Successfully identified at address 0x%02x\n", | 1687 | "xc4000: Successfully identified at address 0x%02x\n", |
1684 | cfg->i2c_address); | 1688 | cfg->i2c_address); |