Lines Matching refs:state
330 struct s2250 *state = to_state(sd); in s2250_s_video_routing() local
334 vidsys = (state->std == V4L2_STD_NTSC) ? 0x01 : 0x00; in s2250_s_video_routing()
348 state->input = input; in s2250_s_video_routing()
354 struct s2250 *state = to_state(sd); in s2250_s_std() local
358 vidsource = (state->input == 1) ? 0x040 : 0x020; in s2250_s_std()
367 state->std = norm; in s2250_s_std()
373 struct s2250 *state = container_of(ctrl->handler, struct s2250, hdl); in s2250_s_ctrl() local
374 struct i2c_client *client = v4l2_get_subdevdata(&state->sd); in s2250_s_ctrl()
411 struct s2250 *state = to_state(sd); in s2250_s_mbus_fmt() local
415 write_reg_fp(client, 0x12b, state->reg12b_val | 0x400); in s2250_s_mbus_fmt()
418 write_reg_fp(client, 0x12b, state->reg12b_val & ~0x400); in s2250_s_mbus_fmt()
427 struct s2250 *state = to_state(sd); in s2250_s_audio_routing() local
431 write_reg(state->audio, 0x08, 0x02); /* Line In */ in s2250_s_audio_routing()
434 write_reg(state->audio, 0x08, 0x04); /* Mic */ in s2250_s_audio_routing()
437 write_reg(state->audio, 0x08, 0x05); /* Mic Boost */ in s2250_s_audio_routing()
442 state->audio_input = input; in s2250_s_audio_routing()
449 struct s2250 *state = to_state(sd); in s2250_log_status() local
451 v4l2_info(sd, "Standard: %s\n", state->std == V4L2_STD_NTSC ? "NTSC" : in s2250_log_status()
452 state->std == V4L2_STD_PAL ? "PAL" : in s2250_log_status()
453 state->std == V4L2_STD_SECAM ? "SECAM" : in s2250_log_status()
455 v4l2_info(sd, "Input: %s\n", state->input == 0 ? "Composite" : in s2250_log_status()
456 state->input == 1 ? "S-video" : in s2250_log_status()
458 v4l2_info(sd, "Audio input: %s\n", state->audio_input == 0 ? "Line In" : in s2250_log_status()
459 state->audio_input == 1 ? "Mic" : in s2250_log_status()
460 state->audio_input == 2 ? "Mic Boost" : in s2250_log_status()
498 struct s2250 *state; in s2250_probe() local
508 state = kzalloc(sizeof(struct s2250), GFP_KERNEL); in s2250_probe()
509 if (state == NULL) { in s2250_probe()
514 sd = &state->sd; in s2250_probe()
520 v4l2_ctrl_handler_init(&state->hdl, 4); in s2250_probe()
521 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
523 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
525 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
527 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
529 sd->ctrl_handler = &state->hdl; in s2250_probe()
530 if (state->hdl.error) { in s2250_probe()
531 int err = state->hdl.error; in s2250_probe()
533 v4l2_ctrl_handler_free(&state->hdl); in s2250_probe()
534 kfree(state); in s2250_probe()
538 state->std = V4L2_STD_NTSC; in s2250_probe()
539 state->brightness = 50; in s2250_probe()
540 state->contrast = 50; in s2250_probe()
541 state->saturation = 50; in s2250_probe()
542 state->hue = 0; in s2250_probe()
543 state->audio = audio; in s2250_probe()
566 state->audio_input = 0; in s2250_probe()
597 v4l2_ctrl_handler_free(&state->hdl); in s2250_probe()
598 kfree(state); in s2250_probe()
604 struct s2250 *state = to_state(i2c_get_clientdata(client)); in s2250_remove() local
606 v4l2_device_unregister_subdev(&state->sd); in s2250_remove()
607 v4l2_ctrl_handler_free(&state->hdl); in s2250_remove()
608 kfree(state); in s2250_remove()