[PATCH] v4l: make the input event device for IR matchable by udev rules.
[safe/jmp/linux-2.6] / drivers / media / video / tveeprom.c
index e1443a0..3674014 100644 (file)
@@ -75,7 +75,7 @@ hauppauge_tuner_fmt[] =
        { 0x00000007, "PAL(B/G)" },
        { 0x00001000, "NTSC(M)" },
        { 0x00000010, "PAL(I)" },
-       { 0x00400000, "SECAM(L/L)" },
+       { 0x00400000, "SECAM(L/L´)" },
        { 0x00000e00, "PAL(D/K)" },
        { 0x03000000, "ATSC Digital" },
 };
@@ -152,13 +152,13 @@ hauppauge_tuner[] =
        { TUNER_MICROTUNE_4049FM5, "Microtune 4049 FM5"},
        { TUNER_ABSENT,        "LG TPI8NSR11F"},
        { TUNER_ABSENT,        "Microtune 4049 FM5 Alt I2C"},
-       { TUNER_ABSENT,        "Philips FQ1216ME MK3"},
+       { TUNER_PHILIPS_FM1216ME_MK3, "Philips FQ1216ME MK3"},
        { TUNER_ABSENT,        "Philips FI1236 MK3"},
        { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216 ME MK3"},
-       { TUNER_ABSENT,        "Philips FM1236 MK3"},
+       { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK3"},
        { TUNER_ABSENT,        "Philips FM1216MP MK3"},
        /* 60-69 */
-       { TUNER_ABSENT,        "LG S001D MK3"},
+       { TUNER_PHILIPS_FM1216ME_MK3, "LG S001D MK3"},
        { TUNER_ABSENT,        "LG M001D MK3"},
        { TUNER_ABSENT,        "LG S701D MK3"},
        { TUNER_ABSENT,        "LG M701D MK3"},
@@ -167,7 +167,7 @@ hauppauge_tuner[] =
        { TUNER_ABSENT,        "Temic 4106FH5"},
        { TUNER_ABSENT,        "Philips FQ1216LMP MK3"},
        { TUNER_LG_NTSC_TAPE,  "LG TAPE H001F MK3"},
-       { TUNER_ABSENT,        "LG TAPE H701F MK3"},
+       { TUNER_LG_NTSC_TAPE,  "LG TAPE H701F MK3"},
        /* 70-79 */
        { TUNER_ABSENT,        "LG TALN H200T"},
        { TUNER_ABSENT,        "LG TALN H250T"},
@@ -183,13 +183,13 @@ hauppauge_tuner[] =
        { TUNER_ABSENT,        "Philips FQ1216LME MK3"},
        { TUNER_ABSENT,        "LG TAPC G701D"},
        { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"},
-       { TUNER_ABSENT,        "TCL 2002MB 3"},
-       { TUNER_ABSENT,        "TCL 2002MI 3"},
+       { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"},
+       { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"},
        { TUNER_TCL_2002N,     "TCL 2002N 6A"},
        { TUNER_ABSENT,        "Philips FQ1236 MK3"},
        { TUNER_ABSENT,        "Samsung TCPN 2121P30A"},
        { TUNER_ABSENT,        "Samsung TCPE 4121P30A"},
-       { TUNER_ABSENT,        "TCL MFPE05 2"},
+       { TUNER_PHILIPS_FM1216ME_MK3, "TCL MFPE05 2"},
        /* 90-99 */
        { TUNER_ABSENT,        "LG TALN H202T"},
        { TUNER_PHILIPS_FQ1216AME_MK4, "Philips FQ1216AME MK4"},
@@ -199,6 +199,13 @@ hauppauge_tuner[] =
        { TUNER_ABSENT,        "Philips FQ1236 MK5"},
        { TUNER_ABSENT,        "Unspecified"},
        { TUNER_LG_PAL_TAPE,   "LG PAL (TAPE Series)"},
+        { TUNER_ABSENT,        "Unspecified"},
+        { TUNER_TCL_2002N,     "TCL 2002N 5H"},
+       /* 100-103 */
+       { TUNER_ABSENT,        "Unspecified"},
+        { TUNER_ABSENT,        "Unspecified"},
+        { TUNER_ABSENT,        "Unspecified"},
+        { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05 4"},
 };
 
 static char *sndtype[] = {
@@ -400,14 +407,6 @@ void tveeprom_hauppauge_analog(struct tveeprom *tvee, unsigned char *eeprom_data
                }
        }
 
-#if 0
-       if (t_format < sizeof(hauppauge_tuner_fmt)/sizeof(struct HAUPPAUGE_TUNER_FMT)) {
-               tvee->tuner_formats = hauppauge_tuner_fmt[t_format].id;
-               t_fmt_name = hauppauge_tuner_fmt[t_format].name;
-       } else {
-               t_fmt_name = "<unknown>";
-       }
-#endif
 
        TVEEPROM_KERN_INFO("Hauppauge: model = %d, rev = %s, serial# = %d\n",
                   tvee->model,
@@ -453,21 +452,6 @@ int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len)
 }
 EXPORT_SYMBOL(tveeprom_read);
 
-int tveeprom_dump(unsigned char *eedata, int len)
-{
-       int i;
-
-       dprintk(1, "%s\n",__FUNCTION__);
-       for (i = 0; i < len; i++) {
-               if (0 == (i % 16))
-                       printk(KERN_INFO "tveeprom: %02x:",i);
-               printk(" %02x",eedata[i]);
-               if (15 == (i % 16))
-                       printk("\n");
-       }
-       return 0;
-}
-EXPORT_SYMBOL(tveeprom_dump);
 
 /* ----------------------------------------------------------------------- */
 /* needed for ivtv.sf.net at the moment.  Should go away in the long       */
@@ -482,10 +466,10 @@ static unsigned short normal_i2c[] = {
        0xa0 >> 1,
        I2C_CLIENT_END,
 };
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
+
 I2C_CLIENT_INSMOD;
 
-struct i2c_driver i2c_driver_tveeprom;
+static struct i2c_driver i2c_driver_tveeprom;
 
 static int
 tveeprom_command(struct i2c_client *client,
@@ -507,6 +491,7 @@ tveeprom_command(struct i2c_client *client,
                eeprom_props[1] = eeprom.tuner_formats;
                eeprom_props[2] = eeprom.model;
                eeprom_props[3] = eeprom.revision;
+               eeprom_props[4] = eeprom.has_radio;
                break;
        default:
                return -EINVAL;
@@ -540,7 +525,7 @@ static int
 tveeprom_attach_adapter (struct i2c_adapter *adapter)
 {
        dprintk(1,"%s: id 0x%x\n",__FUNCTION__,adapter->id);
-       if (adapter->id != (I2C_ALGO_BIT | I2C_HW_B_BT848))
+       if (adapter->id != I2C_HW_B_BT848)
                return 0;
        return i2c_probe(adapter, &addr_data, tveeprom_detect_client);
 }
@@ -557,7 +542,7 @@ tveeprom_detach_client (struct i2c_client *client)
        return 0;
 }
 
-struct i2c_driver i2c_driver_tveeprom = {
+static struct i2c_driver i2c_driver_tveeprom = {
        .owner          = THIS_MODULE,
        .name           = "tveeprom",
        .id             = I2C_DRIVERID_TVEEPROM,