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