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,
485 struct mt9v011 *core;
496 core = devm_kzalloc(&c->dev, sizeof(struct mt9v011), GFP_KERNEL);
497 if (!core)
500 sd = &core->sd;
504 core->pad.flags = MEDIA_PAD_FL_SOURCE;
507 ret = media_entity_pads_init(&sd->entity, 1, &core->pad);
521 v4l2_ctrl_handler_init(&core->ctrls, 5);
522 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
524 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
526 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
528 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
530 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
532 v4l2_ctrl_new_std(&core->ctrls, &mt9v011_ctrl_ops,
535 if (core->ctrls.error) {
536 int ret = core->ctrls.error;
539 v4l2_ctrl_handler_free(&core->ctrls);
542 core->sd.ctrl_handler = &core->ctrls;
544 core->global_gain = 0x0024;
545 core->exposure = 0x01fc;
546 core->width = 640;
547 core->height = 480;
548 core->xtal = 27000000; /* Hz */
553 core->xtal = pdata->xtal;
555 core->xtal / 1000000, (core->xtal / 1000) % 1000);
567 struct mt9v011 *core = to_mt9v011(sd);
574 v4l2_ctrl_handler_free(&core->ctrls);