diff options
-rw-r--r-- | v4l/ChangeLog | 15 | ||||
-rw-r--r-- | v4l_experimental/v3tv/vpx3224-proc.c | 24 | ||||
-rw-r--r-- | v4l_experimental/v3tv/vpx3224.c | 64 |
3 files changed, 59 insertions, 44 deletions
diff --git a/v4l/ChangeLog b/v4l/ChangeLog index 89e977250..d3672583a 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,18 @@ +2005-12-25 16:33 mkrufky + + * v4l_experimental/v3tv/vpx3224-proc.c: (vpx3224_partnum), + (vpx3224_sync_slicer), (vpx3224_bit_slicer), + (vpx3224_dump_register), (vpx3224_init_proc), (vpx3224_del_proc): + * v4l_experimental/v3tv/vpx3224.c: (vpx3224_write), (vpx3224_read), + (vpx3224_fp_status), (vpx3224_fp_write), (vpx3224_fp_read), + (vpx3224_get_status), (vpx3224_auto_norm), (vpx3224_set_norm), + (vpx3224_set_input), (vpx3224_set_picture), + (vpx3224_check_partnum), (vpx3224_command), + (vpx3224_detach_client), (vpx3224_detect_client): + - drop i2c_clientname() + + Signed-off-by: Michael Krufky <mkrufky@m1k.net> + 2005-12-25 16:31 mkrufky * v4l_experimental/v3tv/vpx3224.c: (vpx3224_attach_adapter): diff --git a/v4l_experimental/v3tv/vpx3224-proc.c b/v4l_experimental/v3tv/vpx3224-proc.c index eaf9d12e7..c80b73c34 100644 --- a/v4l_experimental/v3tv/vpx3224-proc.c +++ b/v4l_experimental/v3tv/vpx3224-proc.c @@ -51,7 +51,7 @@ vpx3224_partnum(struct i2c_client *client, int operation, int ctl_name, } else if (operation == SENSORS_PROC_REAL_WRITE) { DEB(printk(KERN_INFO "%s: Warning: write was requested on " "read-only proc file: PartNumber\n", - i2c_clientname(client))); + client->name)); } } @@ -101,14 +101,14 @@ vpx3224_sync_slicer(struct i2c_client *client, int operation, int ctl_name, (KERN_INFO "%s: Warning: write was requested on " "read-only register: " STR_fmt "0x%x: \n", - i2c_clientname(client), + client->name, VPX_LABEL(R_sync_stat) R_sync_stat)); if (*nrels_mag >= 3) DEB(printk (KERN_INFO "%s: Warning: write was requested on " "read-only register: " STR_fmt "0x%x: \n", - i2c_clientname(client), + client->name, VPX_LABEL(R_sync_count) R_sync_count)); } } @@ -155,14 +155,14 @@ vpx3224_bit_slicer(struct i2c_client *client, int operation, int ctl_name, (KERN_INFO "%s: Warning: write was requested on " "read-only register: " STR_fmt "0x%x: \n", - i2c_clientname(client), + client->name, VPX_LABEL(R_coeff_rd) R_coeff_rd)); if (*nrels_mag >= 8) DEB(printk (KERN_INFO "%s: Warning: write was requested on " "read-only register: " STR_fmt "0x%x: \n", - i2c_clientname(client), + client->name, VPX_LABEL(R_level_rd) R_level_rd)); } } @@ -289,7 +289,7 @@ static int vpx3224_dump_register(struct i2c_client *client, int arg) "Chip Identification: %s\n" " Manufacturer ID: 0x%x\n" " Part Number: 0x%x\n", - i2c_clientname(client), jedec, + client->name, jedec, pn); } break; @@ -796,21 +796,21 @@ void vpx3224_init_proc(struct i2c_client *client) /* Register a new directory entry with module sensors */ i = i2c_register_entry - (client, i2c_clientname(client), vpx3224_dir_table_template); + (client, client->name, vpx3224_dir_table_template); if (i < 0) printk(KERN_INFO "%s: could not register " "vpx3224_dir_table_template: err: %d\n", - i2c_clientname(client), i); + client->name, i); else decoder->sysctl_id = i; proc_entry = create_proc_read_entry - (i2c_clientname(client), 0, &proc_root, &vpx3224_read_regs, + (client->name, 0, &proc_root, &vpx3224_read_regs, client); if (!proc_entry) printk(KERN_INFO "%s: could not create " - "/proc/%s\n", i2c_clientname(client), - i2c_clientname(client)); + "/proc/%s\n", client->name, + client->name); } void vpx3224_del_proc(struct i2c_client *client) @@ -819,5 +819,5 @@ void vpx3224_del_proc(struct i2c_client *client) sysctl_id); if (proc_entry) - remove_proc_entry(i2c_clientname(client), &proc_root); + remove_proc_entry(client->name, &proc_root); } diff --git a/v4l_experimental/v3tv/vpx3224.c b/v4l_experimental/v3tv/vpx3224.c index 803716e12..76a7b152a 100644 --- a/v4l_experimental/v3tv/vpx3224.c +++ b/v4l_experimental/v3tv/vpx3224.c @@ -465,7 +465,7 @@ static int vpx3224_write(struct i2c_client *client, u8 reg, u8 value) res = i2c_smbus_write_byte_data(client, reg, value); DEB2(printk (KERN_INFO "%s: Write %sreg: " STR_fmt "0x%x; value: 0x%x\n", - i2c_clientname(client), (res < 0) ? "failed!! " : "", + client->name, (res < 0) ? "failed!! " : "", VPX_LABEL(reg) reg, value)); return res; } @@ -478,7 +478,7 @@ static int vpx3224_read(struct i2c_client *client, u8 reg) if (reg != R_FPSTA) DEB2(printk (KERN_INFO "%s: Read %sreg: " STR_fmt - "0x%x; value: 0x%x\n", i2c_clientname(client), + "0x%x; value: 0x%x\n", client->name, (res < 0) ? "failed!! " : "", VPX_LABEL(reg) reg, res)); @@ -515,7 +515,7 @@ static int vpx3224_fp_status(struct i2c_client *client) if (status < 4) { DEB3(printk(KERN_INFO "%s: FPSTA %s request: %x\n", - i2c_clientname(client), + client->name, (status == 1) ? "write" : (status == 2) ? "read" : "invalid", status)); @@ -527,7 +527,7 @@ static int vpx3224_fp_status(struct i2c_client *client) cond_resched(); } printk(KERN_INFO "%s: FPSTA failed: status: %d\n", - i2c_clientname(client), status); + client->name, status); return -1; } @@ -541,7 +541,7 @@ vpx3224_fp_write(struct i2c_client *client, u16 fpaddr, u16 data) -1) { printk(KERN_INFO "%s: write to R_FPWR failed!! fpaddr: " STR_fmt "0x%x; data: 0x%x\n", - i2c_clientname(client), VPXFP_LABEL(fpaddr) fpaddr, + client->name, VPXFP_LABEL(fpaddr) fpaddr, data); return -1; } @@ -553,7 +553,7 @@ vpx3224_fp_write(struct i2c_client *client, u16 fpaddr, u16 data) res = i2c_smbus_write_word_data(client, R_FPDAT, swab16(data)); DEB2(printk (KERN_INFO "%s: Write %sfpaddr: " STR_fmt - "0x%x; data: 0x%x\n", i2c_clientname(client), + "0x%x; data: 0x%x\n", client->name, (res < 0) ? "write to R_FPDAT failed!! " : "", VPXFP_LABEL(fpaddr) fpaddr, data)); @@ -568,7 +568,7 @@ static int vpx3224_fp_read(struct i2c_client *client, u16 fpaddr) if (i2c_smbus_write_word_data(client, R_FPRD, swab16(fpaddr)) == -1) { printk(KERN_INFO "%s: write to R_FPRD failed!! fpaddr: " - STR_fmt "0x%d\n", i2c_clientname(client), + STR_fmt "0x%d\n", client->name, VPXFP_LABEL(fpaddr) fpaddr); return -1; } @@ -580,7 +580,7 @@ static int vpx3224_fp_read(struct i2c_client *client, u16 fpaddr) data = swab16(i2c_smbus_read_word_data(client, R_FPDAT)); DEB2(printk (KERN_INFO "%s: Read %sfpaddr: " STR_fmt "0x%x data: 0x%x\n", - i2c_clientname(client), + client->name, (data < 0) ? "read R_FPDAT failed!! " : "", VPXFP_LABEL(fpaddr) fpaddr, data)); @@ -628,7 +628,7 @@ static int vpx3224_get_status(struct i2c_client *client) return sdt; DEB(printk(KERN_INFO "%s: status: 0x%x; standard: 0x%x\n", - i2c_clientname(client), status, sdt)); + client->name, status, sdt)); /* bit 2 = 1 == no signal detected */ /* bit 3 = 1 == color amplitude killer active */ @@ -637,13 +637,13 @@ static int vpx3224_get_status(struct i2c_client *client) res |= DECODER_STATUS_GOOD; DEB(printk(KERN_INFO "%s: Video signal detected.\n", - i2c_clientname(client))); + client->name)); if ((status & 0x08) == 0 || (status & 0x20) == 0) res |= DECODER_STATUS_COLOR; else DEB(printk(KERN_INFO "%s: Color killer active.\n", - i2c_clientname(client))); + client->name)); switch (sdt & 7) { @@ -676,7 +676,7 @@ static int vpx3224_auto_norm(struct i2c_client *client) * With an NTSC M signal, there is no clear winner... */ DEB(printk (KERN_INFO "%s: Auto video mode detection not supported.\n", - i2c_clientname(client))); + client->name)); int i, res = 0; char *sdt_desc[8] = { "PAL B,G,H,I", "NTSC M", "SECAM", "NTSC44", @@ -745,11 +745,11 @@ static int vpx3224_set_norm(struct i2c_client *client, int norm) vpx3224_fp_write(client, RFP_accref, decoder->sat >> 4); DEB(printk(KERN_INFO "%s: norm switched to %s\n", - i2c_clientname(client), norms[norm])); + client->name, norms[norm])); } else DEB(printk(KERN_INFO "%s: Unable to set video norm.", - i2c_clientname(client))); + client->name)); return res; } @@ -780,7 +780,7 @@ static int vpx3224_set_input(struct i2c_client *client, int chan) vpx3224_fp_write(client, RFP_sdt, sdt & 0x3CF); DEB(printk(KERN_INFO "%s: input switched to %s\n", - i2c_clientname(client), inputs[decoder->input])); + client->name, inputs[decoder->input])); return 0; } @@ -794,7 +794,7 @@ static int vpx3224_set_picture(struct i2c_client *client, void *arg) DEB(printk(KERN_INFO "%s:vpx reg-> brightness: 0x%03x " "hue: 0x%03x contrast: 0x%03x colour: 0x%03x\n", - i2c_clientname(client), + client->name, ((s16) pic->brightness - (s16) 0x8000) >> 8, ((s16) pic->hue - (s16) 0x8000) >> 4, pic->contrast >> 10, pic->colour >> 4)); @@ -933,21 +933,21 @@ static int vpx3224_check_partnum(struct i2c_client *client, int kind) return -1; break; case VPX3225D: - snprintf(i2c_clientname(client), + snprintf(client->name, sizeof (client->name) - 1, "vpx3225d"); break; case VPX3224D: - snprintf(i2c_clientname(client), + snprintf(client->name, sizeof (client->name) - 1, "vpx3224d"); break; default: printk(KERN_INFO "%s: Wrong part number (0x%04x)\n", - i2c_clientname(client), pn); + client->name, pn); return -1; } } else { - snprintf(i2c_clientname(client), sizeof (client->name) - 1, + snprintf(client->name, sizeof (client->name) - 1, "forced vpx32xx"); } return 0; @@ -970,7 +970,7 @@ vpx3224_command(struct i2c_client *client, unsigned int cmd, void *arg) DEB(printk (KERN_INFO "%s: DECODER_GET_CAPABILITIES\n", - i2c_clientname(client))); + client->name)); cap->flags = VIDEO_DECODER_PAL | VIDEO_DECODER_NTSC | VIDEO_DECODER_SECAM; @@ -982,7 +982,7 @@ vpx3224_command(struct i2c_client *client, unsigned int cmd, void *arg) case DECODER_GET_STATUS:{ DEB(printk(KERN_INFO "%s: DECODER_GET_STATUS\n", - i2c_clientname(client))); + client->name)); res = vpx3224_get_status(client); *(int *) arg = res; break; @@ -990,14 +990,14 @@ vpx3224_command(struct i2c_client *client, unsigned int cmd, void *arg) case DECODER_SET_NORM:{ DEB(printk(KERN_INFO "%s: DECODER_SET_NORM %d\n", - i2c_clientname(client), *(int *) arg)); + client->name, *(int *) arg)); res = vpx3224_set_norm(client, *(int *) arg); break; } case DECODER_SET_INPUT:{ DEB(printk(KERN_INFO "%s: DECODER_SET_INPUT\n", - i2c_clientname(client))); + client->name)); res = vpx3224_set_input(client, *(int *) arg); break; } @@ -1006,7 +1006,7 @@ vpx3224_command(struct i2c_client *client, unsigned int cmd, void *arg) int *iarg = arg; DEB(printk(KERN_INFO "%s: DECODER_SET_OUTPUT\n", - i2c_clientname(client))); + client->name)); /* not much choice of outputs */ if (iarg != 0) return -EINVAL; @@ -1019,7 +1019,7 @@ vpx3224_command(struct i2c_client *client, unsigned int cmd, void *arg) DEB(printk (KERN_INFO "%s: DECODER_ENABLE_OUTPUT: %s\n", - i2c_clientname(client), + client->name, (decoder->enable) ? "Enable" : "Disable")); res = vpx3224_write(client, R_oena, @@ -1030,14 +1030,14 @@ vpx3224_command(struct i2c_client *client, unsigned int cmd, void *arg) case DECODER_SET_PICTURE:{ DEB(printk(KERN_INFO "%s: DECODER_SET_PICTURE\n", - i2c_clientname(client))); + client->name)); res = vpx3224_set_picture(client, arg); break; } #if 0 case DECODER_SET_WINDOW:{ DEB(printk( KERN_INFO "%s: DECODER_SET_WINDOW\n", - i2c_clientname(client))); + client->name)); res = vpx3224_set_window(client, arg); break; } @@ -1109,7 +1109,7 @@ static int vpx3224_detach_client(struct i2c_client *client) THIS_MODULE->name, res)); if (res < 0) { printk(KERN_ERR "%s: %s: Unable to detach client.\n", - THIS_MODULE->name, i2c_clientname(client)); + THIS_MODULE->name, client->name); return res; } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) @@ -1214,7 +1214,7 @@ static int vpx3224_detect_client(struct i2c_adapter *adapter, int address, -ENOMEM enlarge I2C_CLIENT_MAX */ res = i2c_attach_client(client); DEB2(printk(KERN_INFO "%s: i2c_attach_client returned %d\n", - i2c_clientname(client), res)); + client->name, res)); if (res < 0) { vpx3224_detach_client(client); return res; @@ -1223,13 +1223,13 @@ static int vpx3224_detect_client(struct i2c_adapter *adapter, int address, res = vpx3224_init_client(client); if (res < 0) { printk(KERN_INFO "%s: Initialization error!\n", - i2c_clientname(client)); + client->name); vpx3224_detach_client(client); return res; } printk(KERN_INFO "%s: %s client found at address 0x%x\n", - THIS_MODULE->name, i2c_clientname(client), client->addr); + THIS_MODULE->name, client->name, client->addr); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) #if defined (CONFIG_PROC_FS) && defined (CONFIG_V3TV_VERBOSEDEBUG) |