Lines Matching refs:state
137 struct adv7393_state *state = to_state(sd); in adv7393_setstd() local
162 val = state->reg80 & ~SD_STD_MASK; in adv7393_setstd()
168 state->reg80 = val; in adv7393_setstd()
171 val = state->reg01 & ~INPUT_MODE_MASK; in adv7393_setstd()
177 state->reg01 = val; in adv7393_setstd()
188 val = state->reg82; in adv7393_setstd()
200 state->reg82 = val; in adv7393_setstd()
211 struct adv7393_state *state = to_state(sd); in adv7393_setoutput() local
223 val = state->reg00 & 0x03; in adv7393_setoutput()
236 state->reg00 = val; in adv7393_setoutput()
239 val = state->reg02 | YUV_OUTPUT_SELECT; in adv7393_setoutput()
244 state->reg02 = val; in adv7393_setoutput()
247 val = state->reg82; in adv7393_setoutput()
256 state->reg82 = val; in adv7393_setoutput()
259 val = state->reg35 & HD_DAC_SWAP_DI; in adv7393_setoutput()
264 state->reg35 = val; in adv7393_setoutput()
275 struct adv7393_state *state = to_state(sd); in adv7393_log_status() local
277 v4l2_info(sd, "Standard: %llx\n", (unsigned long long)state->std); in adv7393_log_status()
278 v4l2_info(sd, "Output: %s\n", (state->output == 0) ? "Composite" : in adv7393_log_status()
279 ((state->output == 1) ? "Component" : "S-Video")); in adv7393_log_status()
320 struct adv7393_state *state = to_state(sd); in adv7393_s_std_output() local
323 if (state->std == std) in adv7393_s_std_output()
328 state->std = std; in adv7393_s_std_output()
336 struct adv7393_state *state = to_state(sd); in adv7393_s_routing() local
339 if (state->output == output) in adv7393_s_routing()
344 state->output = output; in adv7393_s_routing()
361 struct adv7393_state *state = to_state(sd); in adv7393_initialize() local
376 err = adv7393_setoutput(sd, state->output); in adv7393_initialize()
382 err = adv7393_setstd(sd, state->std); in adv7393_initialize()
394 struct adv7393_state *state; in adv7393_probe() local
403 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); in adv7393_probe()
404 if (state == NULL) in adv7393_probe()
407 state->reg00 = ADV7393_POWER_MODE_REG_DEFAULT; in adv7393_probe()
408 state->reg01 = 0x00; in adv7393_probe()
409 state->reg02 = 0x20; in adv7393_probe()
410 state->reg35 = ADV7393_HD_MODE_REG6_DEFAULT; in adv7393_probe()
411 state->reg80 = ADV7393_SD_MODE_REG1_DEFAULT; in adv7393_probe()
412 state->reg82 = ADV7393_SD_MODE_REG2_DEFAULT; in adv7393_probe()
414 state->output = ADV7393_COMPOSITE_ID; in adv7393_probe()
415 state->std = V4L2_STD_NTSC; in adv7393_probe()
417 v4l2_i2c_subdev_init(&state->sd, client, &adv7393_ops); in adv7393_probe()
419 v4l2_ctrl_handler_init(&state->hdl, 3); in adv7393_probe()
420 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops, in adv7393_probe()
424 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops, in adv7393_probe()
428 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops, in adv7393_probe()
432 state->sd.ctrl_handler = &state->hdl; in adv7393_probe()
433 if (state->hdl.error) { in adv7393_probe()
434 int err = state->hdl.error; in adv7393_probe()
436 v4l2_ctrl_handler_free(&state->hdl); in adv7393_probe()
439 v4l2_ctrl_handler_setup(&state->hdl); in adv7393_probe()
441 err = adv7393_initialize(&state->sd); in adv7393_probe()
443 v4l2_ctrl_handler_free(&state->hdl); in adv7393_probe()
450 struct adv7393_state *state = to_state(sd); in adv7393_remove() local
453 v4l2_ctrl_handler_free(&state->hdl); in adv7393_remove()