Lines Matching refs:sensor
392 struct tcm825x_sensor *sensor = s->priv; in tcm825x_find_size() local
397 dev_dbg(&sensor->i2c_client->dev, "size %d\n", isize); in tcm825x_find_size()
403 dev_dbg(&sensor->i2c_client->dev, "format default VGA\n"); in tcm825x_find_size()
416 struct tcm825x_sensor *sensor = s->priv; in tcm825x_configure() local
417 struct v4l2_pix_format *pix = &sensor->pix; in tcm825x_configure()
419 struct v4l2_fract *fper = &sensor->timeperframe; in tcm825x_configure()
427 sensor->i2c_client, sensor->platform_data->default_regs()); in tcm825x_configure()
433 dev_dbg(&sensor->i2c_client->dev, in tcm825x_configure()
435 err = tcm825x_write_reg_mask(sensor->i2c_client, in tcm825x_configure()
451 dev_dbg(&sensor->i2c_client->dev, in tcm825x_configure()
455 err = tcm825x_write_reg_mask(sensor->i2c_client, in tcm825x_configure()
466 val = tcm825x_read_reg(sensor->i2c_client, 0x02); in tcm825x_configure()
468 tcm825x_write_reg(sensor->i2c_client, 0x02, val); in tcm825x_configure()
492 struct tcm825x_sensor *sensor = s->priv; in ioctl_g_ctrl() local
493 struct i2c_client *client = sensor->i2c_client; in ioctl_g_ctrl()
528 val ^= sensor->platform_data->is_upside_down(); in ioctl_g_ctrl()
537 struct tcm825x_sensor *sensor = s->priv; in ioctl_s_ctrl() local
538 struct i2c_client *client = sensor->i2c_client; in ioctl_s_ctrl()
564 val ^= sensor->platform_data->is_upside_down(); in ioctl_s_ctrl()
599 struct tcm825x_sensor *sensor = s->priv; in ioctl_try_fmt_cap() local
605 dev_dbg(&sensor->i2c_client->dev, "isize = %d num_capture = %lu\n", in ioctl_try_fmt_cap()
623 dev_dbg(&sensor->i2c_client->dev, "format = 0x%08x\n", in ioctl_try_fmt_cap()
642 struct tcm825x_sensor *sensor = s->priv; in ioctl_s_fmt_cap() local
652 sensor->pix = *pix; in ioctl_s_fmt_cap()
660 struct tcm825x_sensor *sensor = s->priv; in ioctl_g_fmt_cap() local
662 f->fmt.pix = sensor->pix; in ioctl_g_fmt_cap()
670 struct tcm825x_sensor *sensor = s->priv; in ioctl_g_parm() local
680 cparm->timeperframe = sensor->timeperframe; in ioctl_g_parm()
688 struct tcm825x_sensor *sensor = s->priv; in ioctl_s_parm() local
712 sensor->timeperframe = *timeperframe; in ioctl_s_parm()
721 struct tcm825x_sensor *sensor = s->priv; in ioctl_s_power() local
723 return sensor->platform_data->power_set(on); in ioctl_s_power()
736 struct tcm825x_sensor *sensor = s->priv; in ioctl_g_ifparm() local
737 struct v4l2_fract *timeperframe = &sensor->timeperframe; in ioctl_g_ifparm()
742 rval = sensor->platform_data->ifparm(p); in ioctl_g_ifparm()
763 struct tcm825x_sensor *sensor = s->priv; in ioctl_g_needs_reset() local
765 return sensor->platform_data->needs_reset(s, buf, &sensor->pix); in ioctl_g_needs_reset()
785 struct tcm825x_sensor *sensor = s->priv; in ioctl_dev_init() local
788 r = tcm825x_read_reg(sensor->i2c_client, 0x01); in ioctl_dev_init()
792 dev_err(&sensor->i2c_client->dev, "device not detected\n"); in ioctl_dev_init()
853 struct tcm825x_sensor *sensor = &tcm825x; in tcm825x_probe() local
858 sensor->platform_data = client->dev.platform_data; in tcm825x_probe()
860 if (sensor->platform_data == NULL in tcm825x_probe()
861 || !sensor->platform_data->is_okay()) in tcm825x_probe()
864 sensor->v4l2_int_device = &tcm825x_int_device; in tcm825x_probe()
866 sensor->i2c_client = client; in tcm825x_probe()
867 i2c_set_clientdata(client, sensor); in tcm825x_probe()
870 sensor->pix.width = tcm825x_sizes[QVGA].width; in tcm825x_probe()
871 sensor->pix.height = tcm825x_sizes[QVGA].height; in tcm825x_probe()
872 sensor->pix.pixelformat = V4L2_PIX_FMT_RGB565; in tcm825x_probe()
874 return v4l2_int_device_register(sensor->v4l2_int_device); in tcm825x_probe()
879 struct tcm825x_sensor *sensor = i2c_get_clientdata(client); in tcm825x_remove() local
884 v4l2_int_device_unregister(sensor->v4l2_int_device); in tcm825x_remove()