예제 #1
0
int sn9c102_probe_ov7630(struct sn9c102_device* cam)
{
	const struct usb_device_id ov7630_id_table[] = {
		{ USB_DEVICE(0x0c45, 0x602c), },
		{ USB_DEVICE(0x0c45, 0x602d), },
		{ USB_DEVICE(0x0c45, 0x608f), },
		{ USB_DEVICE(0x0c45, 0x60b0), },
		{ }
	};
	int err = 0;

	if (!sn9c102_match_id(cam, ov7630_id_table))
		return -ENODEV;

	err += sn9c102_write_reg(cam, 0x01, 0x01);
	err += sn9c102_write_reg(cam, 0x00, 0x01);
	err += sn9c102_write_reg(cam, 0x28, 0x17);
	if (err)
		return -EIO;

	err += sn9c102_i2c_try_write(cam, &ov7630, 0x0b, 0);
	if (err)
		return -ENODEV;

	sn9c102_attach_sensor(cam, &ov7630);

	return 0;
}
예제 #2
0
int sn9c102_probe_tas5110d(struct sn9c102_device* cam)
{
    const struct usb_device_id tas5110d_id_table[] = {
        { USB_DEVICE(0x0c45, 0x6007), },
        { }
    };

    if (!sn9c102_match_id(cam, tas5110d_id_table))
        return -ENODEV;

    sn9c102_attach_sensor(cam, &tas5110d);

    return 0;
}
예제 #3
0
int sn9c102_probe_tas5130d1b(struct sn9c102_device* cam)
{
	const struct usb_device_id tas5130d1b_id_table[] = {
		{ USB_DEVICE(0x0c45, 0x6025), },
		{ USB_DEVICE(0x0c45, 0x60aa), },
		{ }
	};

	/* Sensor detection is based on USB pid/vid */
	if (!sn9c102_match_id(cam, tas5130d1b_id_table))
		return -ENODEV;

	sn9c102_attach_sensor(cam, &tas5130d1b);

	return 0;
}
예제 #4
0
int sn9c102_probe_pas202bca(struct sn9c102_device* cam)
{
    const struct usb_device_id pas202bca_id_table[] = {
        { USB_DEVICE(0x0c45, 0x60af), },
        { }
    };
    int err = 0;

    if (!sn9c102_match_id(cam,pas202bca_id_table))
        return -ENODEV;

    err += sn9c102_write_reg(cam, 0x01, 0x01);
    err += sn9c102_write_reg(cam, 0x40, 0x01);
    err += sn9c102_write_reg(cam, 0x28, 0x17);
    if (err)
        return -EIO;

    if (sn9c102_i2c_try_write(cam, &pas202bca, 0x10, 0)) /* try to write */
        return -ENODEV;

    sn9c102_attach_sensor(cam, &pas202bca);

    return 0;
}