diff options
author | Mike Isely <isely@pobox.com> | 2007-11-25 23:53:12 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:02 -0500 |
commit | 989eb154eafad00c3b5039a3eca03e108dac1df8 (patch) | |
tree | 1a2b0638f473c4d5877188f80bce0efbeee0ded9 /drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | |
parent | 681c739944018d80dbcf7f19997eba97676c7116 (diff) |
V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single place
The pvrusb2 driver currently supports two variants of the Hauppauge
PVR USB2. However there are other hardware types potentially
supportable, but the driver at the moment is not structured to make it
easy to describe these minor variations. This changeset is the first
set of changes to make such additional device support possible.
Device attributes are held in several tables all contained within
pvrusb2-devattr.c; all other device-specific driver behavior now
derives from these tables.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-core.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index f8b7bd1e0d89..7721ec85d572 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | |||
@@ -980,14 +980,16 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw) | |||
980 | printk(KERN_INFO "%s: IR disabled\n",hdw->name); | 980 | printk(KERN_INFO "%s: IR disabled\n",hdw->name); |
981 | hdw->i2c_func[0x18] = i2c_black_hole; | 981 | hdw->i2c_func[0x18] = i2c_black_hole; |
982 | } else if (ir_mode[hdw->unit_number] == 1) { | 982 | } else if (ir_mode[hdw->unit_number] == 1) { |
983 | if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { | 983 | if (hdw->hdw_desc->flag_has_cx25840) { |
984 | hdw->i2c_func[0x18] = i2c_24xxx_ir; | 984 | hdw->i2c_func[0x18] = i2c_24xxx_ir; |
985 | } | 985 | } |
986 | } | 986 | } |
987 | if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { | 987 | if (hdw->hdw_desc->flag_has_cx25840) { |
988 | hdw->i2c_func[0x1b] = i2c_hack_wm8775; | ||
989 | hdw->i2c_func[0x44] = i2c_hack_cx25840; | 988 | hdw->i2c_func[0x44] = i2c_hack_cx25840; |
990 | } | 989 | } |
990 | if (hdw->hdw_desc->flag_has_wm8775) { | ||
991 | hdw->i2c_func[0x1b] = i2c_hack_wm8775; | ||
992 | } | ||
991 | 993 | ||
992 | // Configure the adapter and set up everything else related to it. | 994 | // Configure the adapter and set up everything else related to it. |
993 | memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap)); | 995 | memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap)); |