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()
313 struct adv7393_state *state = to_state(sd); in adv7393_s_std_output() local
316 if (state->std == std) in adv7393_s_std_output()
321 state->std = std; in adv7393_s_std_output()
329 struct adv7393_state *state = to_state(sd); in adv7393_s_routing() local
332 if (state->output == output) in adv7393_s_routing()
337 state->output = output; in adv7393_s_routing()
354 struct adv7393_state *state = to_state(sd); in adv7393_initialize() local
369 err = adv7393_setoutput(sd, state->output); in adv7393_initialize()
375 err = adv7393_setstd(sd, state->std); in adv7393_initialize()
387 struct adv7393_state *state; in adv7393_probe() local
396 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); in adv7393_probe()
397 if (state == NULL) in adv7393_probe()
400 state->reg00 = ADV7393_POWER_MODE_REG_DEFAULT; in adv7393_probe()
401 state->reg01 = 0x00; in adv7393_probe()
402 state->reg02 = 0x20; in adv7393_probe()
403 state->reg35 = ADV7393_HD_MODE_REG6_DEFAULT; in adv7393_probe()
404 state->reg80 = ADV7393_SD_MODE_REG1_DEFAULT; in adv7393_probe()
405 state->reg82 = ADV7393_SD_MODE_REG2_DEFAULT; in adv7393_probe()
407 state->output = ADV7393_COMPOSITE_ID; in adv7393_probe()
408 state->std = V4L2_STD_NTSC; in adv7393_probe()
410 v4l2_i2c_subdev_init(&state->sd, client, &adv7393_ops); in adv7393_probe()
412 v4l2_ctrl_handler_init(&state->hdl, 3); in adv7393_probe()
413 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops, in adv7393_probe()
417 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops, in adv7393_probe()
421 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops, in adv7393_probe()
425 state->sd.ctrl_handler = &state->hdl; in adv7393_probe()
426 if (state->hdl.error) { in adv7393_probe()
427 int err = state->hdl.error; in adv7393_probe()
429 v4l2_ctrl_handler_free(&state->hdl); in adv7393_probe()
432 v4l2_ctrl_handler_setup(&state->hdl); in adv7393_probe()
434 err = adv7393_initialize(&state->sd); in adv7393_probe()
436 v4l2_ctrl_handler_free(&state->hdl); in adv7393_probe()
443 struct adv7393_state *state = to_state(sd); in adv7393_remove() local
446 v4l2_ctrl_handler_free(&state->hdl); in adv7393_remove()