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()
343 struct mt9v011 *core = to_mt9v011(sd); in mt9v011_set_fmt() local
354 core->width = fmt->width; in mt9v011_set_fmt()
355 core->height = fmt->height; in mt9v011_set_fmt()
424 struct mt9v011 *core = in mt9v011_s_ctrl() local
426 struct v4l2_subdev *sd = &core->sd; in mt9v011_s_ctrl()
430 core->global_gain = ctrl->val; in mt9v011_s_ctrl()
433 core->exposure = ctrl->val; in mt9v011_s_ctrl()
436 core->red_bal = ctrl->val; in mt9v011_s_ctrl()
439 core->blue_bal = ctrl->val; in mt9v011_s_ctrl()
442 core->hflip = ctrl->val; in mt9v011_s_ctrl()
446 core->vflip = ctrl->val; in mt9v011_s_ctrl()
480 .core = &mt9v011_core_ops,
494 struct mt9v011 *core; in mt9v011_probe() local
502 core = devm_kzalloc(&c->dev, sizeof(struct mt9v011), GFP_KERNEL); in mt9v011_probe()
503 if (!core) in mt9v011_probe()
506 sd = &core->sd; in mt9v011_probe()
518 v4l2_ctrl_handler_init(&core->ctrls, 5); in mt9v011_probe()
519 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
521 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
523 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
525 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
527 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
529 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops, in mt9v011_probe()
532 if (core->ctrls.error) { in mt9v011_probe()
533 int ret = core->ctrls.error; in mt9v011_probe()
536 v4l2_ctrl_handler_free(&core->ctrls); in mt9v011_probe()
539 core->sd.ctrl_handler = &core->ctrls; in mt9v011_probe()
541 core->global_gain = 0x0024; in mt9v011_probe()
542 core->exposure = 0x01fc; in mt9v011_probe()
543 core->width = 640; in mt9v011_probe()
544 core->height = 480; in mt9v011_probe()
545 core->xtal = 27000000; /* Hz */ in mt9v011_probe()
550 core->xtal = pdata->xtal; in mt9v011_probe()
552 core->xtal / 1000000, (core->xtal / 1000) % 1000); in mt9v011_probe()
564 struct mt9v011 *core = to_mt9v011(sd); in mt9v011_remove() local
571 v4l2_ctrl_handler_free(&core->ctrls); in mt9v011_remove()