Lines Matching defs:state
137 struct adv7393_state *state = to_state(sd);
162 val = state->reg80 & ~SD_STD_MASK;
168 state->reg80 = val;
171 val = state->reg01 & ~INPUT_MODE_MASK;
177 state->reg01 = val;
188 val = state->reg82;
200 state->reg82 = val;
211 struct adv7393_state *state = to_state(sd);
223 val = state->reg00 & 0x03;
236 state->reg00 = val;
239 val = state->reg02 | YUV_OUTPUT_SELECT;
244 state->reg02 = val;
247 val = state->reg82;
256 state->reg82 = val;
259 val = state->reg35 & HD_DAC_SWAP_DI;
264 state->reg35 = val;
275 struct adv7393_state *state = to_state(sd);
277 v4l2_info(sd, "Standard: %llx\n", (unsigned long long)state->std);
278 v4l2_info(sd, "Output: %s\n", (state->output == 0) ? "Composite" :
279 ((state->output == 1) ? "Component" : "S-Video"));
313 struct adv7393_state *state = to_state(sd);
316 if (state->std == std)
321 state->std = std;
329 struct adv7393_state *state = to_state(sd);
332 if (state->output == output)
337 state->output = output;
354 struct adv7393_state *state = to_state(sd);
369 err = adv7393_setoutput(sd, state->output);
375 err = adv7393_setstd(sd, state->std);
386 struct adv7393_state *state;
395 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
396 if (state == NULL)
399 state->reg00 = ADV7393_POWER_MODE_REG_DEFAULT;
400 state->reg01 = 0x00;
401 state->reg02 = 0x20;
402 state->reg35 = ADV7393_HD_MODE_REG6_DEFAULT;
403 state->reg80 = ADV7393_SD_MODE_REG1_DEFAULT;
404 state->reg82 = ADV7393_SD_MODE_REG2_DEFAULT;
406 state->output = ADV7393_COMPOSITE_ID;
407 state->std = V4L2_STD_NTSC;
409 v4l2_i2c_subdev_init(&state->sd, client, &adv7393_ops);
411 v4l2_ctrl_handler_init(&state->hdl, 3);
412 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops,
416 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops,
420 v4l2_ctrl_new_std(&state->hdl, &adv7393_ctrl_ops,
424 state->sd.ctrl_handler = &state->hdl;
425 if (state->hdl.error) {
426 int err = state->hdl.error;
428 v4l2_ctrl_handler_free(&state->hdl);
431 v4l2_ctrl_handler_setup(&state->hdl);
433 err = adv7393_initialize(&state->sd);
435 v4l2_ctrl_handler_free(&state->hdl);
442 struct adv7393_state *state = to_state(sd);
445 v4l2_ctrl_handler_free(&state->hdl);