Lines Matching refs:core
175 struct mt9v011 *core = to_mt9v011(sd); in set_balance() local
180 exposure = core->exposure; in set_balance()
182 green_gain = calc_mt9v011_gain(core->global_gain); in set_balance()
184 bal = core->global_gain; in set_balance()
185 bal += (core->blue_bal * core->global_gain / (1 << 7)); in set_balance()
188 bal = core->global_gain; in set_balance()
189 bal += (core->red_bal * core->global_gain / (1 << 7)); in set_balance()
201 struct mt9v011 *core = to_mt9v011(sd); in calc_fps() local
216 frames_per_ms = core->xtal * 1000l; in calc_fps()
231 struct mt9v011 *core = to_mt9v011(sd); in calc_speed() local
248 t_time = core->xtal * ((u64)numerator); in calc_speed()
271 struct mt9v011 *core = to_mt9v011(sd); in set_res() local
285 hstart = 20 + (640 - core->width) / 2; in set_res()
287 mt9v011_write(sd, R04_MT9V011_WIDTH, core->width); in set_res()
288 mt9v011_write(sd, R05_MT9V011_HBLANK, 771 - core->width); in set_res()
290 vstart = 8 + (480 - core->height) / 2; in set_res()
292 mt9v011_write(sd, R03_MT9V011_HEIGHT, core->height); in set_res()
293 mt9v011_write(sd, R06_MT9V011_VBLANK, 508 - core->height); in set_res()
300 struct mt9v011 *core = to_mt9v011(sd); in set_read_mode() local
303 if (core->hflip) in set_read_mode()
306 if (core->vflip) in set_read_mode()
390 struct mt9v011 *core = to_mt9v011(sd); in mt9v011_s_mbus_fmt() local
397 core->width = fmt->width; in mt9v011_s_mbus_fmt()
398 core->height = fmt->height; in mt9v011_s_mbus_fmt()
426 struct mt9v011 *core = in mt9v011_s_ctrl() local
428 struct v4l2_subdev *sd = &core->sd; in mt9v011_s_ctrl()
432 core->global_gain = ctrl->val; in mt9v011_s_ctrl()
435 core->exposure = ctrl->val; in mt9v011_s_ctrl()
438 core->red_bal = ctrl->val; in mt9v011_s_ctrl()
441 core->blue_bal = ctrl->val; in mt9v011_s_ctrl()
444 core->hflip = ctrl->val; in mt9v011_s_ctrl()
448 core->vflip = ctrl->val; in mt9v011_s_ctrl()
480 .core = &mt9v011_core_ops,
493 struct mt9v011 *core; in mt9v011_probe() local
501 core = devm_kzalloc(&c->dev, sizeof(struct mt9v011), GFP_KERNEL); in mt9v011_probe()
502 if (!core) in mt9v011_probe()
505 sd = &core->sd; in mt9v011_probe()
517 v4l2_ctrl_handler_init(&core->ctrls, 5); in mt9v011_probe()
518 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
520 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
522 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
524 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
526 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
528 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
531 if (core->ctrls.error) { in mt9v011_probe()
532 int ret = core->ctrls.error; in mt9v011_probe()
535 v4l2_ctrl_handler_free(&core->ctrls); in mt9v011_probe()
538 core->sd.ctrl_handler = &core->ctrls; in mt9v011_probe()
540 core->global_gain = 0x0024; in mt9v011_probe()
541 core->exposure = 0x01fc; in mt9v011_probe()
542 core->width = 640; in mt9v011_probe()
543 core->height = 480; in mt9v011_probe()
544 core->xtal = 27000000; /* Hz */ in mt9v011_probe()
549 core->xtal = pdata->xtal; in mt9v011_probe()
551 core->xtal / 1000000, (core->xtal / 1000) % 1000); in mt9v011_probe()
563 struct mt9v011 *core = to_mt9v011(sd); in mt9v011_remove() local
570 v4l2_ctrl_handler_free(&core->ctrls); in mt9v011_remove()