Lines Matching refs:core
177 struct mt9v011 *core = to_mt9v011(sd);
182 exposure = core->exposure;
184 green_gain = calc_mt9v011_gain(core->global_gain);
186 bal = core->global_gain;
187 bal += (core->blue_bal * core->global_gain / (1 << 7));
190 bal = core->global_gain;
191 bal += (core->red_bal * core->global_gain / (1 << 7));
203 struct mt9v011 *core = to_mt9v011(sd);
218 frames_per_ms = core->xtal * 1000l;
233 struct mt9v011 *core = to_mt9v011(sd);
250 t_time = core->xtal * ((u64)numerator);
273 struct mt9v011 *core = to_mt9v011(sd);
287 hstart = 20 + (640 - core->width) / 2;
289 mt9v011_write(sd, R04_MT9V011_WIDTH, core->width);
290 mt9v011_write(sd, R05_MT9V011_HBLANK, 771 - core->width);
292 vstart = 8 + (480 - core->height) / 2;
294 mt9v011_write(sd, R03_MT9V011_HEIGHT, core->height);
295 mt9v011_write(sd, R06_MT9V011_VBLANK, 508 - core->height);
302 struct mt9v011 *core = to_mt9v011(sd);
305 if (core->hflip)
308 if (core->vflip)
345 struct mt9v011 *core = to_mt9v011(sd);
356 core->width = fmt->width;
357 core->height = fmt->height;
415 struct mt9v011 *core =
417 struct v4l2_subdev *sd = &core->sd;
421 core->global_gain = ctrl->val;
424 core->exposure = ctrl->val;
427 core->red_bal = ctrl->val;
430 core->blue_bal = ctrl->val;
433 core->hflip = ctrl->val;
437 core->vflip = ctrl->val;
471 .core = &mt9v011_core_ops,
484 struct mt9v011 *core;
495 core = devm_kzalloc(&c->dev, sizeof(struct mt9v011), GFP_KERNEL);
496 if (!core)
499 sd = &core->sd;
503 core->pad.flags = MEDIA_PAD_FL_SOURCE;
506 ret = media_entity_pads_init(&sd->entity, 1, &core->pad);
520 v4l2_ctrl_handler_init(&core->ctrls, 5);
521 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
523 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
525 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
527 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
529 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
531 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
534 if (core->ctrls.error) {
535 int ret = core->ctrls.error;
538 v4l2_ctrl_handler_free(&core->ctrls);
541 core->sd.ctrl_handler = &core->ctrls;
543 core->global_gain = 0x0024;
544 core->exposure = 0x01fc;
545 core->width = 640;
546 core->height = 480;
547 core->xtal = 27000000; /* Hz */
552 core->xtal = pdata->xtal;
554 core->xtal / 1000000, (core->xtal / 1000) % 1000);
566 struct mt9v011 *core = to_mt9v011(sd);
573 v4l2_ctrl_handler_free(&core->ctrls);