Lines Matching refs:state

142 	struct tw2804 *state = to_state(sd);
145 state->norm & V4L2_STD_525_60 ? "60 Hz" : "50 Hz");
146 v4l2_info(sd, "Channel: %d\n", state->channel);
147 v4l2_info(sd, "Input: %d\n", state->input);
166 struct tw2804 *state = to_state_from_ctrl(ctrl);
167 struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
191 struct tw2804 *state = to_state_from_ctrl(ctrl);
192 struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
199 reg = read_reg(client, addr, state->channel);
206 return write_reg(client, addr, reg, state->channel);
210 reg = read_reg(client, addr, state->channel);
214 return write_reg(client, addr, reg, state->channel);
230 ctrl->val, state->channel);
234 ctrl->val, state->channel);
238 ctrl->val, state->channel);
242 ctrl->val, state->channel);
349 struct tw2804 *state;
357 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
358 if (state == NULL)
360 sd = &state->sd;
362 state->channel = -1;
363 state->norm = V4L2_STD_NTSC;
365 v4l2_ctrl_handler_init(&state->hdl, 10);
366 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
368 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
370 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
372 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
374 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
376 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
378 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
382 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
386 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
390 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops,
394 sd->ctrl_handler = &state->hdl;
395 err = state->hdl.error;
397 v4l2_ctrl_handler_free(&state->hdl);
410 struct tw2804 *state = to_state(sd);
413 v4l2_ctrl_handler_free(&state->hdl);