mirror of https://gitee.com/openkylin/linux.git
[media] v4l: Remove module_name argument to the v4l2_i2c_new_subdev* functions
The argument isn't used anymore by the functions, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
aa2d8cbe16
commit
9a1f8b34aa
|
@ -291,7 +291,7 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev)
|
||||||
goto unregister_v4l2_dev;
|
goto unregister_v4l2_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev_board(&rsdev->v4l2_dev, adapter, NULL,
|
sd = v4l2_i2c_new_subdev_board(&rsdev->v4l2_dev, adapter,
|
||||||
pdata->subdev_board_info, NULL);
|
pdata->subdev_board_info, NULL);
|
||||||
if (!sd) {
|
if (!sd) {
|
||||||
dev_err(&pdev->dev, "Cannot get v4l2 subdevice\n");
|
dev_err(&pdev->dev, "Cannot get v4l2 subdevice\n");
|
||||||
|
|
|
@ -212,7 +212,7 @@ void au0828_card_setup(struct au0828_dev *dev)
|
||||||
be abstracted out if we ever need to support a different
|
be abstracted out if we ever need to support a different
|
||||||
demod) */
|
demod) */
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "au8522", 0x8e >> 1, NULL);
|
"au8522", 0x8e >> 1, NULL);
|
||||||
if (sd == NULL)
|
if (sd == NULL)
|
||||||
printk(KERN_ERR "analog subdev registration failed\n");
|
printk(KERN_ERR "analog subdev registration failed\n");
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ void au0828_card_setup(struct au0828_dev *dev)
|
||||||
if (dev->board.tuner_type != TUNER_ABSENT) {
|
if (dev->board.tuner_type != TUNER_ABSENT) {
|
||||||
/* Load the tuner module, which does the attach */
|
/* Load the tuner module, which does the attach */
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tuner", dev->board.tuner_addr, NULL);
|
"tuner", dev->board.tuner_addr, NULL);
|
||||||
if (sd == NULL)
|
if (sd == NULL)
|
||||||
printk(KERN_ERR "tuner subdev registration fail\n");
|
printk(KERN_ERR "tuner subdev registration fail\n");
|
||||||
|
|
||||||
|
|
|
@ -3529,7 +3529,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "saa6588", 0, addrs);
|
&btv->c.i2c_adap, "saa6588", 0, addrs);
|
||||||
btv->has_saa6588 = (sd != NULL);
|
btv->has_saa6588 = (sd != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3554,7 +3554,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
||||||
};
|
};
|
||||||
|
|
||||||
btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "msp3400", 0, addrs);
|
&btv->c.i2c_adap, "msp3400", 0, addrs);
|
||||||
if (btv->sd_msp34xx)
|
if (btv->sd_msp34xx)
|
||||||
return;
|
return;
|
||||||
goto no_audio;
|
goto no_audio;
|
||||||
|
@ -3568,7 +3568,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tda7432", 0, addrs))
|
&btv->c.i2c_adap, "tda7432", 0, addrs))
|
||||||
return;
|
return;
|
||||||
goto no_audio;
|
goto no_audio;
|
||||||
}
|
}
|
||||||
|
@ -3576,7 +3576,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
||||||
case 3: {
|
case 3: {
|
||||||
/* The user specified that we should probe for tvaudio */
|
/* The user specified that we should probe for tvaudio */
|
||||||
btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tvaudio", 0, tvaudio_addrs());
|
&btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
|
||||||
if (btv->sd_tvaudio)
|
if (btv->sd_tvaudio)
|
||||||
return;
|
return;
|
||||||
goto no_audio;
|
goto no_audio;
|
||||||
|
@ -3596,11 +3596,11 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
||||||
found is really something else (e.g. a tea6300). */
|
found is really something else (e.g. a tea6300). */
|
||||||
if (!bttv_tvcards[btv->c.type].no_msp34xx) {
|
if (!bttv_tvcards[btv->c.type].no_msp34xx) {
|
||||||
btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "msp3400",
|
&btv->c.i2c_adap, "msp3400",
|
||||||
0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
|
0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
|
||||||
} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
|
} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
|
||||||
btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "msp3400",
|
&btv->c.i2c_adap, "msp3400",
|
||||||
0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
|
0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3616,13 +3616,13 @@ void __devinit bttv_init_card2(struct bttv *btv)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tda7432", 0, addrs))
|
&btv->c.i2c_adap, "tda7432", 0, addrs))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now see if we can find one of the tvaudio devices. */
|
/* Now see if we can find one of the tvaudio devices. */
|
||||||
btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tvaudio", 0, tvaudio_addrs());
|
&btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
|
||||||
if (btv->sd_tvaudio)
|
if (btv->sd_tvaudio)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3646,13 +3646,13 @@ void __devinit bttv_init_tuner(struct bttv *btv)
|
||||||
/* Load tuner module before issuing tuner config call! */
|
/* Load tuner module before issuing tuner config call! */
|
||||||
if (bttv_tvcards[btv->c.type].has_radio)
|
if (bttv_tvcards[btv->c.type].has_radio)
|
||||||
v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tuner",
|
&btv->c.i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
|
0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
|
||||||
v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tuner",
|
&btv->c.i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
||||||
v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
|
||||||
&btv->c.i2c_adap, NULL, "tuner",
|
&btv->c.i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
|
0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
|
||||||
|
|
||||||
tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
|
tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
|
||||||
|
|
|
@ -2066,7 +2066,7 @@ static int cafe_pci_probe(struct pci_dev *pdev,
|
||||||
|
|
||||||
cam->sensor_addr = 0x42;
|
cam->sensor_addr = 0x42;
|
||||||
cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
|
cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
|
||||||
NULL, "ov7670", 0, &sensor_cfg, cam->sensor_addr, NULL);
|
"ov7670", 0, &sensor_cfg, cam->sensor_addr, NULL);
|
||||||
if (cam->sensor == NULL) {
|
if (cam->sensor == NULL) {
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto out_smbus;
|
goto out_smbus;
|
||||||
|
|
|
@ -122,15 +122,15 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx)
|
||||||
if (hw == CX18_HW_TUNER) {
|
if (hw == CX18_HW_TUNER) {
|
||||||
/* special tuner group handling */
|
/* special tuner group handling */
|
||||||
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
|
||||||
adap, NULL, type, 0, cx->card_i2c->radio);
|
adap, type, 0, cx->card_i2c->radio);
|
||||||
if (sd != NULL)
|
if (sd != NULL)
|
||||||
sd->grp_id = hw;
|
sd->grp_id = hw;
|
||||||
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
|
||||||
adap, NULL, type, 0, cx->card_i2c->demod);
|
adap, type, 0, cx->card_i2c->demod);
|
||||||
if (sd != NULL)
|
if (sd != NULL)
|
||||||
sd->grp_id = hw;
|
sd->grp_id = hw;
|
||||||
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev,
|
||||||
adap, NULL, type, 0, cx->card_i2c->tv);
|
adap, type, 0, cx->card_i2c->tv);
|
||||||
if (sd != NULL)
|
if (sd != NULL)
|
||||||
sd->grp_id = hw;
|
sd->grp_id = hw;
|
||||||
return sd != NULL ? 0 : -1;
|
return sd != NULL ? 0 : -1;
|
||||||
|
@ -144,7 +144,7 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* It's an I2C device other than an analog tuner or IR chip */
|
/* It's an I2C device other than an analog tuner or IR chip */
|
||||||
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, NULL, type, hw_addrs[idx],
|
sd = v4l2_i2c_new_subdev(&cx->v4l2_dev, adap, type, hw_addrs[idx],
|
||||||
NULL);
|
NULL);
|
||||||
if (sd != NULL)
|
if (sd != NULL)
|
||||||
sd->grp_id = hw;
|
sd->grp_id = hw;
|
||||||
|
|
|
@ -560,7 +560,7 @@ void cx231xx_card_setup(struct cx231xx *dev)
|
||||||
if (dev->board.decoder == CX231XX_AVDECODER) {
|
if (dev->board.decoder == CX231XX_AVDECODER) {
|
||||||
dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_bus[0].i2c_adap,
|
&dev->i2c_bus[0].i2c_adap,
|
||||||
NULL, "cx25840", 0x88 >> 1, NULL);
|
"cx25840", 0x88 >> 1, NULL);
|
||||||
if (dev->sd_cx25840 == NULL)
|
if (dev->sd_cx25840 == NULL)
|
||||||
cx231xx_info("cx25840 subdev registration failure\n");
|
cx231xx_info("cx25840 subdev registration failure\n");
|
||||||
cx25840_call(dev, core, load_fw);
|
cx25840_call(dev, core, load_fw);
|
||||||
|
@ -571,7 +571,7 @@ void cx231xx_card_setup(struct cx231xx *dev)
|
||||||
if (dev->board.tuner_type != TUNER_ABSENT) {
|
if (dev->board.tuner_type != TUNER_ABSENT) {
|
||||||
dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
dev->sd_tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap,
|
&dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap,
|
||||||
NULL, "tuner",
|
"tuner",
|
||||||
dev->tuner_addr, NULL);
|
dev->tuner_addr, NULL);
|
||||||
if (dev->sd_tuner == NULL)
|
if (dev->sd_tuner == NULL)
|
||||||
cx231xx_info("tuner subdev registration failure\n");
|
cx231xx_info("tuner subdev registration failure\n");
|
||||||
|
|
|
@ -1247,7 +1247,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
|
||||||
case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
|
case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
|
||||||
dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_bus[2].i2c_adap,
|
&dev->i2c_bus[2].i2c_adap,
|
||||||
NULL, "cx25840", 0x88 >> 1, NULL);
|
"cx25840", 0x88 >> 1, NULL);
|
||||||
if (dev->sd_cx25840) {
|
if (dev->sd_cx25840) {
|
||||||
dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE;
|
dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE;
|
||||||
v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
|
v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
|
||||||
|
|
|
@ -1507,10 +1507,10 @@ int cx23885_video_register(struct cx23885_dev *dev)
|
||||||
if (dev->tuner_addr)
|
if (dev->tuner_addr)
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_bus[1].i2c_adap,
|
&dev->i2c_bus[1].i2c_adap,
|
||||||
NULL, "tuner", dev->tuner_addr, NULL);
|
"tuner", dev->tuner_addr, NULL);
|
||||||
else
|
else
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_bus[1].i2c_adap, NULL,
|
&dev->i2c_bus[1].i2c_adap,
|
||||||
"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV));
|
"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV));
|
||||||
if (sd) {
|
if (sd) {
|
||||||
struct tuner_setup tun_setup;
|
struct tuner_setup tun_setup;
|
||||||
|
|
|
@ -3515,19 +3515,18 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
|
||||||
later code configures a tea5767.
|
later code configures a tea5767.
|
||||||
*/
|
*/
|
||||||
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
||||||
NULL, "tuner",
|
"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
|
|
||||||
if (has_demod)
|
if (has_demod)
|
||||||
v4l2_i2c_new_subdev(&core->v4l2_dev,
|
v4l2_i2c_new_subdev(&core->v4l2_dev,
|
||||||
&core->i2c_adap, NULL, "tuner",
|
&core->i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
||||||
if (core->board.tuner_addr == ADDR_UNSET) {
|
if (core->board.tuner_addr == ADDR_UNSET) {
|
||||||
v4l2_i2c_new_subdev(&core->v4l2_dev,
|
v4l2_i2c_new_subdev(&core->v4l2_dev,
|
||||||
&core->i2c_adap, NULL, "tuner",
|
&core->i2c_adap, "tuner",
|
||||||
0, has_demod ? tv_addrs + 4 : tv_addrs);
|
0, has_demod ? tv_addrs + 4 : tv_addrs);
|
||||||
} else {
|
} else {
|
||||||
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
||||||
NULL, "tuner", core->board.tuner_addr, NULL);
|
"tuner", core->board.tuner_addr, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1896,14 +1896,13 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
|
||||||
|
|
||||||
if (core->board.audio_chip == V4L2_IDENT_WM8775)
|
if (core->board.audio_chip == V4L2_IDENT_WM8775)
|
||||||
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
||||||
NULL, "wm8775", 0x36 >> 1, NULL);
|
"wm8775", 0x36 >> 1, NULL);
|
||||||
|
|
||||||
if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) {
|
if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) {
|
||||||
/* This probes for a tda9874 as is used on some
|
/* This probes for a tda9874 as is used on some
|
||||||
Pixelview Ultra boards. */
|
Pixelview Ultra boards. */
|
||||||
v4l2_i2c_new_subdev(&core->v4l2_dev,
|
v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
|
||||||
&core->i2c_adap,
|
"tvaudio", 0, I2C_ADDRS(0xb0 >> 1));
|
||||||
NULL, "tvaudio", 0, I2C_ADDRS(0xb0 >> 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (core->boardnr) {
|
switch (core->boardnr) {
|
||||||
|
|
|
@ -1986,7 +1986,6 @@ static __init int vpfe_probe(struct platform_device *pdev)
|
||||||
vpfe_dev->sd[i] =
|
vpfe_dev->sd[i] =
|
||||||
v4l2_i2c_new_subdev_board(&vpfe_dev->v4l2_dev,
|
v4l2_i2c_new_subdev_board(&vpfe_dev->v4l2_dev,
|
||||||
i2c_adap,
|
i2c_adap,
|
||||||
NULL,
|
|
||||||
&sdinfo->board_info,
|
&sdinfo->board_info,
|
||||||
NULL);
|
NULL);
|
||||||
if (vpfe_dev->sd[i]) {
|
if (vpfe_dev->sd[i]) {
|
||||||
|
|
|
@ -2013,7 +2013,6 @@ static __init int vpif_probe(struct platform_device *pdev)
|
||||||
vpif_obj.sd[i] =
|
vpif_obj.sd[i] =
|
||||||
v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev,
|
v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev,
|
||||||
i2c_adap,
|
i2c_adap,
|
||||||
NULL,
|
|
||||||
&subdevdata->board_info,
|
&subdevdata->board_info,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
|
@ -1553,7 +1553,7 @@ static __init int vpif_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
for (i = 0; i < subdev_count; i++) {
|
for (i = 0; i < subdev_count; i++) {
|
||||||
vpif_obj.sd[i] = v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev,
|
vpif_obj.sd[i] = v4l2_i2c_new_subdev_board(&vpif_obj.v4l2_dev,
|
||||||
i2c_adap, NULL,
|
i2c_adap,
|
||||||
&subdevdata[i].board_info,
|
&subdevdata[i].board_info,
|
||||||
NULL);
|
NULL);
|
||||||
if (!vpif_obj.sd[i]) {
|
if (!vpif_obj.sd[i]) {
|
||||||
|
|
|
@ -2554,39 +2554,39 @@ void em28xx_card_setup(struct em28xx *dev)
|
||||||
/* request some modules */
|
/* request some modules */
|
||||||
if (dev->board.has_msp34xx)
|
if (dev->board.has_msp34xx)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "msp3400", 0, msp3400_addrs);
|
"msp3400", 0, msp3400_addrs);
|
||||||
|
|
||||||
if (dev->board.decoder == EM28XX_SAA711X)
|
if (dev->board.decoder == EM28XX_SAA711X)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "saa7115_auto", 0, saa711x_addrs);
|
"saa7115_auto", 0, saa711x_addrs);
|
||||||
|
|
||||||
if (dev->board.decoder == EM28XX_TVP5150)
|
if (dev->board.decoder == EM28XX_TVP5150)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tvp5150", 0, tvp5150_addrs);
|
"tvp5150", 0, tvp5150_addrs);
|
||||||
|
|
||||||
if (dev->em28xx_sensor == EM28XX_MT9V011) {
|
if (dev->em28xx_sensor == EM28XX_MT9V011) {
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "mt9v011", 0, mt9v011_addrs);
|
&dev->i2c_adap, "mt9v011", 0, mt9v011_addrs);
|
||||||
v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal);
|
v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (dev->board.adecoder == EM28XX_TVAUDIO)
|
if (dev->board.adecoder == EM28XX_TVAUDIO)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tvaudio", dev->board.tvaudio_addr, NULL);
|
"tvaudio", dev->board.tvaudio_addr, NULL);
|
||||||
|
|
||||||
if (dev->board.tuner_type != TUNER_ABSENT) {
|
if (dev->board.tuner_type != TUNER_ABSENT) {
|
||||||
int has_demod = (dev->tda9887_conf & TDA9887_PRESENT);
|
int has_demod = (dev->tda9887_conf & TDA9887_PRESENT);
|
||||||
|
|
||||||
if (dev->board.radio.type)
|
if (dev->board.radio.type)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tuner", dev->board.radio_addr, NULL);
|
"tuner", dev->board.radio_addr, NULL);
|
||||||
|
|
||||||
if (has_demod)
|
if (has_demod)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "tuner",
|
&dev->i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
||||||
if (dev->tuner_addr == 0) {
|
if (dev->tuner_addr == 0) {
|
||||||
enum v4l2_i2c_tuner_type type =
|
enum v4l2_i2c_tuner_type type =
|
||||||
|
@ -2594,14 +2594,14 @@ void em28xx_card_setup(struct em28xx *dev)
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "tuner",
|
&dev->i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(type));
|
0, v4l2_i2c_tuner_addrs(type));
|
||||||
|
|
||||||
if (sd)
|
if (sd)
|
||||||
dev->tuner_addr = v4l2_i2c_subdev_addr(sd);
|
dev->tuner_addr = v4l2_i2c_subdev_addr(sd);
|
||||||
} else {
|
} else {
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tuner", dev->tuner_addr, NULL);
|
"tuner", dev->tuner_addr, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1486,7 +1486,7 @@ static int __devinit viu_of_probe(struct platform_device *op,
|
||||||
|
|
||||||
ad = i2c_get_adapter(0);
|
ad = i2c_get_adapter(0);
|
||||||
viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad,
|
viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad,
|
||||||
NULL, "saa7113", VIU_VIDEO_DECODER_ADDR, NULL);
|
"saa7113", VIU_VIDEO_DECODER_ADDR, NULL);
|
||||||
|
|
||||||
viu_dev->vidq.timeout.function = viu_vid_timeout;
|
viu_dev->vidq.timeout.function = viu_vid_timeout;
|
||||||
viu_dev->vidq.timeout.data = (unsigned long)viu_dev;
|
viu_dev->vidq.timeout.data = (unsigned long)viu_dev;
|
||||||
|
|
|
@ -239,19 +239,16 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
|
||||||
return -1;
|
return -1;
|
||||||
if (hw == IVTV_HW_TUNER) {
|
if (hw == IVTV_HW_TUNER) {
|
||||||
/* special tuner handling */
|
/* special tuner handling */
|
||||||
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
|
||||||
adap, NULL, type,
|
itv->card_i2c->radio);
|
||||||
0, itv->card_i2c->radio);
|
|
||||||
if (sd)
|
if (sd)
|
||||||
sd->grp_id = 1 << idx;
|
sd->grp_id = 1 << idx;
|
||||||
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
|
||||||
adap, NULL, type,
|
itv->card_i2c->demod);
|
||||||
0, itv->card_i2c->demod);
|
|
||||||
if (sd)
|
if (sd)
|
||||||
sd->grp_id = 1 << idx;
|
sd->grp_id = 1 << idx;
|
||||||
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev, adap, type, 0,
|
||||||
adap, NULL, type,
|
itv->card_i2c->tv);
|
||||||
0, itv->card_i2c->tv);
|
|
||||||
if (sd)
|
if (sd)
|
||||||
sd->grp_id = 1 << idx;
|
sd->grp_id = 1 << idx;
|
||||||
return sd ? 0 : -1;
|
return sd ? 0 : -1;
|
||||||
|
@ -267,17 +264,16 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx)
|
||||||
/* It's an I2C device other than an analog tuner or IR chip */
|
/* It's an I2C device other than an analog tuner or IR chip */
|
||||||
if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
|
if (hw == IVTV_HW_UPD64031A || hw == IVTV_HW_UPD6408X) {
|
||||||
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
||||||
adap, NULL, type, 0, I2C_ADDRS(hw_addrs[idx]));
|
adap, type, 0, I2C_ADDRS(hw_addrs[idx]));
|
||||||
} else if (hw == IVTV_HW_CX25840) {
|
} else if (hw == IVTV_HW_CX25840) {
|
||||||
struct cx25840_platform_data pdata;
|
struct cx25840_platform_data pdata;
|
||||||
|
|
||||||
pdata.pvr150_workaround = itv->pvr150_workaround;
|
pdata.pvr150_workaround = itv->pvr150_workaround;
|
||||||
sd = v4l2_i2c_new_subdev_cfg(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev_cfg(&itv->v4l2_dev,
|
||||||
adap, NULL, type, 0, &pdata, hw_addrs[idx],
|
adap, type, 0, &pdata, hw_addrs[idx], NULL);
|
||||||
NULL);
|
|
||||||
} else {
|
} else {
|
||||||
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&itv->v4l2_dev,
|
||||||
adap, NULL, type, hw_addrs[idx], NULL);
|
adap, type, hw_addrs[idx], NULL);
|
||||||
}
|
}
|
||||||
if (sd)
|
if (sd)
|
||||||
sd->grp_id = 1 << idx;
|
sd->grp_id = 1 << idx;
|
||||||
|
|
|
@ -185,17 +185,17 @@ static int mxb_probe(struct saa7146_dev *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
mxb->saa7111a = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
||||||
NULL, "saa7111", I2C_SAA7111A, NULL);
|
"saa7111", I2C_SAA7111A, NULL);
|
||||||
mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
mxb->tea6420_1 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
||||||
NULL, "tea6420", I2C_TEA6420_1, NULL);
|
"tea6420", I2C_TEA6420_1, NULL);
|
||||||
mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
mxb->tea6420_2 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
||||||
NULL, "tea6420", I2C_TEA6420_2, NULL);
|
"tea6420", I2C_TEA6420_2, NULL);
|
||||||
mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
mxb->tea6415c = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
||||||
NULL, "tea6415c", I2C_TEA6415C, NULL);
|
"tea6415c", I2C_TEA6415C, NULL);
|
||||||
mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
mxb->tda9840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
||||||
NULL, "tda9840", I2C_TDA9840, NULL);
|
"tda9840", I2C_TDA9840, NULL);
|
||||||
mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
mxb->tuner = v4l2_i2c_new_subdev(&dev->v4l2_dev, &mxb->i2c_adapter,
|
||||||
NULL, "tuner", I2C_TUNER, NULL);
|
"tuner", I2C_TUNER, NULL);
|
||||||
|
|
||||||
/* check if all devices are present */
|
/* check if all devices are present */
|
||||||
if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c ||
|
if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c ||
|
||||||
|
|
|
@ -2088,16 +2088,14 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
|
||||||
" Setting up with specified i2c address 0x%x",
|
" Setting up with specified i2c address 0x%x",
|
||||||
mid, i2caddr[0]);
|
mid, i2caddr[0]);
|
||||||
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
|
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
|
||||||
NULL, fname,
|
fname, i2caddr[0], NULL);
|
||||||
i2caddr[0], NULL);
|
|
||||||
} else {
|
} else {
|
||||||
pvr2_trace(PVR2_TRACE_INIT,
|
pvr2_trace(PVR2_TRACE_INIT,
|
||||||
"Module ID %u:"
|
"Module ID %u:"
|
||||||
" Setting up with address probe list",
|
" Setting up with address probe list",
|
||||||
mid);
|
mid);
|
||||||
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
|
sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap,
|
||||||
NULL, fname,
|
fname, 0, i2caddr);
|
||||||
0, i2caddr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sd) {
|
if (!sd) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ static struct v4l2_subdev *fimc_subdev_register(struct fimc_dev *fimc,
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev_board(&vid_cap->v4l2_dev, i2c_adap,
|
sd = v4l2_i2c_new_subdev_board(&vid_cap->v4l2_dev, i2c_adap,
|
||||||
NULL, isp_info->board_info, NULL);
|
isp_info->board_info, NULL);
|
||||||
if (!sd) {
|
if (!sd) {
|
||||||
v4l2_err(&vid_cap->v4l2_dev, "failed to acquire subdev\n");
|
v4l2_err(&vid_cap->v4l2_dev, "failed to acquire subdev\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -7551,22 +7551,22 @@ int saa7134_board_init2(struct saa7134_dev *dev)
|
||||||
so we do not need to probe for a radio tuner device. */
|
so we do not need to probe for a radio tuner device. */
|
||||||
if (dev->radio_type != UNSET)
|
if (dev->radio_type != UNSET)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "tuner",
|
&dev->i2c_adap, "tuner",
|
||||||
dev->radio_addr, NULL);
|
dev->radio_addr, NULL);
|
||||||
if (has_demod)
|
if (has_demod)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "tuner",
|
&dev->i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
||||||
if (dev->tuner_addr == ADDR_UNSET) {
|
if (dev->tuner_addr == ADDR_UNSET) {
|
||||||
enum v4l2_i2c_tuner_type type =
|
enum v4l2_i2c_tuner_type type =
|
||||||
has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
|
has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
|
||||||
|
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "tuner",
|
&dev->i2c_adap, "tuner",
|
||||||
0, v4l2_i2c_tuner_addrs(type));
|
0, v4l2_i2c_tuner_addrs(type));
|
||||||
} else {
|
} else {
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "tuner",
|
&dev->i2c_adap, "tuner",
|
||||||
dev->tuner_addr, NULL);
|
dev->tuner_addr, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -991,7 +991,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
||||||
if (card_is_empress(dev)) {
|
if (card_is_empress(dev)) {
|
||||||
struct v4l2_subdev *sd =
|
struct v4l2_subdev *sd =
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "saa6752hs",
|
"saa6752hs",
|
||||||
saa7134_boards[dev->board].empress_addr, NULL);
|
saa7134_boards[dev->board].empress_addr, NULL);
|
||||||
|
|
||||||
if (sd)
|
if (sd)
|
||||||
|
@ -1002,7 +1002,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
|
||||||
&dev->i2c_adap, NULL, "saa6588",
|
&dev->i2c_adap, "saa6588",
|
||||||
0, I2C_ADDRS(saa7134_boards[dev->board].rds_addr));
|
0, I2C_ADDRS(saa7134_boards[dev->board].rds_addr));
|
||||||
if (sd) {
|
if (sd) {
|
||||||
printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
|
printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
|
||||||
|
|
|
@ -1406,7 +1406,7 @@ static int __devinit sh_vou_probe(struct platform_device *pdev)
|
||||||
goto ereset;
|
goto ereset;
|
||||||
|
|
||||||
subdev = v4l2_i2c_new_subdev_board(&vou_dev->v4l2_dev, i2c_adap,
|
subdev = v4l2_i2c_new_subdev_board(&vou_dev->v4l2_dev, i2c_adap,
|
||||||
NULL, vou_pdata->board_info, NULL);
|
vou_pdata->board_info, NULL);
|
||||||
if (!subdev) {
|
if (!subdev) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto ei2cnd;
|
goto ei2cnd;
|
||||||
|
|
|
@ -896,7 +896,7 @@ static int soc_camera_init_i2c(struct soc_camera_device *icd,
|
||||||
icl->board_info->platform_data = icd;
|
icl->board_info->platform_data = icd;
|
||||||
|
|
||||||
subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap,
|
subdev = v4l2_i2c_new_subdev_board(&ici->v4l2_dev, adap,
|
||||||
NULL, icl->board_info, NULL);
|
icl->board_info, NULL);
|
||||||
if (!subdev)
|
if (!subdev)
|
||||||
goto ei2cnd;
|
goto ei2cnd;
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
|
||||||
hit-and-miss. */
|
hit-and-miss. */
|
||||||
mdelay(10);
|
mdelay(10);
|
||||||
v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
|
v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
|
||||||
&usbvision->i2c_adap, NULL,
|
&usbvision->i2c_adap,
|
||||||
"saa7115_auto", 0, saa711x_addrs);
|
"saa7115_auto", 0, saa711x_addrs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -261,14 +261,14 @@ int usbvision_i2c_register(struct usb_usbvision *usbvision)
|
||||||
struct tuner_setup tun_setup;
|
struct tuner_setup tun_setup;
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
|
||||||
&usbvision->i2c_adap, NULL,
|
&usbvision->i2c_adap,
|
||||||
"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
|
||||||
/* depending on whether we found a demod or not, select
|
/* depending on whether we found a demod or not, select
|
||||||
the tuner type. */
|
the tuner type. */
|
||||||
type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
|
type = sd ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
|
||||||
|
|
||||||
sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
|
sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev,
|
||||||
&usbvision->i2c_adap, NULL,
|
&usbvision->i2c_adap,
|
||||||
"tuner", 0, v4l2_i2c_tuner_addrs(type));
|
"tuner", 0, v4l2_i2c_tuner_addrs(type));
|
||||||
|
|
||||||
if (sd == NULL)
|
if (sd == NULL)
|
||||||
|
|
|
@ -368,18 +368,15 @@ EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init);
|
||||||
|
|
||||||
/* Load an i2c sub-device. */
|
/* Load an i2c sub-device. */
|
||||||
struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
|
struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
|
||||||
struct i2c_adapter *adapter, const char *module_name,
|
struct i2c_adapter *adapter, struct i2c_board_info *info,
|
||||||
struct i2c_board_info *info, const unsigned short *probe_addrs)
|
const unsigned short *probe_addrs)
|
||||||
{
|
{
|
||||||
struct v4l2_subdev *sd = NULL;
|
struct v4l2_subdev *sd = NULL;
|
||||||
struct i2c_client *client;
|
struct i2c_client *client;
|
||||||
|
|
||||||
BUG_ON(!v4l2_dev);
|
BUG_ON(!v4l2_dev);
|
||||||
|
|
||||||
if (module_name)
|
request_module(I2C_MODULE_PREFIX "%s", info->type);
|
||||||
request_module(module_name);
|
|
||||||
else
|
|
||||||
request_module(I2C_MODULE_PREFIX "%s", info->type);
|
|
||||||
|
|
||||||
/* Create the i2c client */
|
/* Create the i2c client */
|
||||||
if (info->addr == 0 && probe_addrs)
|
if (info->addr == 0 && probe_addrs)
|
||||||
|
@ -432,8 +429,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
|
||||||
EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board);
|
EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board);
|
||||||
|
|
||||||
struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
|
struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
|
||||||
struct i2c_adapter *adapter,
|
struct i2c_adapter *adapter, const char *client_type,
|
||||||
const char *module_name, const char *client_type,
|
|
||||||
int irq, void *platform_data,
|
int irq, void *platform_data,
|
||||||
u8 addr, const unsigned short *probe_addrs)
|
u8 addr, const unsigned short *probe_addrs)
|
||||||
{
|
{
|
||||||
|
@ -447,8 +443,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
|
||||||
info.irq = irq;
|
info.irq = irq;
|
||||||
info.platform_data = platform_data;
|
info.platform_data = platform_data;
|
||||||
|
|
||||||
return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, module_name,
|
return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, probe_addrs);
|
||||||
&info, probe_addrs);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg);
|
EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg);
|
||||||
|
|
||||||
|
|
|
@ -1360,7 +1360,7 @@ static __devinit int viacam_probe(struct platform_device *pdev)
|
||||||
*/
|
*/
|
||||||
sensor_adapter = viafb_find_i2c_adapter(VIA_PORT_31);
|
sensor_adapter = viafb_find_i2c_adapter(VIA_PORT_31);
|
||||||
cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, sensor_adapter,
|
cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, sensor_adapter,
|
||||||
NULL, "ov7670", 0x42 >> 1, NULL);
|
"ov7670", 0x42 >> 1, NULL);
|
||||||
if (cam->sensor == NULL) {
|
if (cam->sensor == NULL) {
|
||||||
dev_err(&pdev->dev, "Unable to find the sensor!\n");
|
dev_err(&pdev->dev, "Unable to find the sensor!\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
|
|
|
@ -4334,10 +4334,10 @@ static int __init vino_module_init(void)
|
||||||
|
|
||||||
vino_drvdata->decoder =
|
vino_drvdata->decoder =
|
||||||
v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter,
|
v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter,
|
||||||
NULL, "saa7191", 0, I2C_ADDRS(0x45));
|
"saa7191", 0, I2C_ADDRS(0x45));
|
||||||
vino_drvdata->camera =
|
vino_drvdata->camera =
|
||||||
v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter,
|
v4l2_i2c_new_subdev(&vino_drvdata->v4l2_dev, &vino_i2c_adapter,
|
||||||
NULL, "indycam", 0, I2C_ADDRS(0x2b));
|
"indycam", 0, I2C_ADDRS(0x2b));
|
||||||
|
|
||||||
dprintk("init complete!\n");
|
dprintk("init complete!\n");
|
||||||
|
|
||||||
|
|
|
@ -1343,13 +1343,12 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
|
||||||
}
|
}
|
||||||
|
|
||||||
zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev,
|
zr->decoder = v4l2_i2c_new_subdev(&zr->v4l2_dev,
|
||||||
&zr->i2c_adapter, NULL, zr->card.i2c_decoder,
|
&zr->i2c_adapter, zr->card.i2c_decoder,
|
||||||
0, zr->card.addrs_decoder);
|
0, zr->card.addrs_decoder);
|
||||||
|
|
||||||
if (zr->card.i2c_encoder)
|
if (zr->card.i2c_encoder)
|
||||||
zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev,
|
zr->encoder = v4l2_i2c_new_subdev(&zr->v4l2_dev,
|
||||||
&zr->i2c_adapter,
|
&zr->i2c_adapter, zr->card.i2c_encoder,
|
||||||
NULL, zr->card.i2c_encoder,
|
|
||||||
0, zr->card.addrs_encoder);
|
0, zr->card.addrs_encoder);
|
||||||
|
|
||||||
dprintk(2,
|
dprintk(2,
|
||||||
|
|
|
@ -199,7 +199,7 @@ static int init_i2c_module(struct i2c_adapter *adapter, const char *type,
|
||||||
struct go7007 *go = i2c_get_adapdata(adapter);
|
struct go7007 *go = i2c_get_adapdata(adapter);
|
||||||
struct v4l2_device *v4l2_dev = &go->v4l2_dev;
|
struct v4l2_device *v4l2_dev = &go->v4l2_dev;
|
||||||
|
|
||||||
if (v4l2_i2c_new_subdev(v4l2_dev, adapter, NULL, type, addr, NULL))
|
if (v4l2_i2c_new_subdev(v4l2_dev, adapter, type, addr, NULL))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", type);
|
printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", type);
|
||||||
|
|
|
@ -545,7 +545,7 @@ static void tm6000_config_tuner(struct tm6000_core *dev)
|
||||||
|
|
||||||
/* Load tuner module */
|
/* Load tuner module */
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tuner", dev->tuner_addr, NULL);
|
"tuner", dev->tuner_addr, NULL);
|
||||||
|
|
||||||
memset(&tun_setup, 0, sizeof(tun_setup));
|
memset(&tun_setup, 0, sizeof(tun_setup));
|
||||||
tun_setup.type = dev->tuner_type;
|
tun_setup.type = dev->tuner_type;
|
||||||
|
@ -683,7 +683,7 @@ static int tm6000_init_dev(struct tm6000_core *dev)
|
||||||
|
|
||||||
if (dev->caps.has_tda9874)
|
if (dev->caps.has_tda9874)
|
||||||
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
|
||||||
NULL, "tvaudio", I2C_ADDR_TDA9874, NULL);
|
"tvaudio", I2C_ADDR_TDA9874, NULL);
|
||||||
|
|
||||||
/* register and initialize V4L2 */
|
/* register and initialize V4L2 */
|
||||||
rc = tm6000_v4l2_register(dev);
|
rc = tm6000_v4l2_register(dev);
|
||||||
|
|
|
@ -137,31 +137,27 @@ struct v4l2_subdev_ops;
|
||||||
|
|
||||||
|
|
||||||
/* Load an i2c module and return an initialized v4l2_subdev struct.
|
/* Load an i2c module and return an initialized v4l2_subdev struct.
|
||||||
Only call request_module if module_name != NULL.
|
|
||||||
The client_type argument is the name of the chip that's on the adapter. */
|
The client_type argument is the name of the chip that's on the adapter. */
|
||||||
struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
|
struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
|
||||||
struct i2c_adapter *adapter,
|
struct i2c_adapter *adapter, const char *client_type,
|
||||||
const char *module_name, const char *client_type,
|
|
||||||
int irq, void *platform_data,
|
int irq, void *platform_data,
|
||||||
u8 addr, const unsigned short *probe_addrs);
|
u8 addr, const unsigned short *probe_addrs);
|
||||||
|
|
||||||
/* Load an i2c module and return an initialized v4l2_subdev struct.
|
/* Load an i2c module and return an initialized v4l2_subdev struct.
|
||||||
Only call request_module if module_name != NULL.
|
|
||||||
The client_type argument is the name of the chip that's on the adapter. */
|
The client_type argument is the name of the chip that's on the adapter. */
|
||||||
static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
|
static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
|
||||||
struct i2c_adapter *adapter,
|
struct i2c_adapter *adapter, const char *client_type,
|
||||||
const char *module_name, const char *client_type,
|
|
||||||
u8 addr, const unsigned short *probe_addrs)
|
u8 addr, const unsigned short *probe_addrs)
|
||||||
{
|
{
|
||||||
return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, module_name,
|
return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, client_type, 0, NULL,
|
||||||
client_type, 0, NULL, addr, probe_addrs);
|
addr, probe_addrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct i2c_board_info;
|
struct i2c_board_info;
|
||||||
|
|
||||||
struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
|
struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
|
||||||
struct i2c_adapter *adapter, const char *module_name,
|
struct i2c_adapter *adapter, struct i2c_board_info *info,
|
||||||
struct i2c_board_info *info, const unsigned short *probe_addrs);
|
const unsigned short *probe_addrs);
|
||||||
|
|
||||||
/* Initialize an v4l2_subdev with data from an i2c_client struct */
|
/* Initialize an v4l2_subdev with data from an i2c_client struct */
|
||||||
void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
|
void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client,
|
||||||
|
|
Loading…
Reference in New Issue