Lines Matching refs:state

154 	struct tw2804 *state = to_state(sd);  in tw2804_log_status()  local
157 state->norm & V4L2_STD_525_60 ? "60 Hz" : "50 Hz"); in tw2804_log_status()
158 v4l2_info(sd, "Channel: %d\n", state->channel); in tw2804_log_status()
159 v4l2_info(sd, "Input: %d\n", state->input); in tw2804_log_status()
178 struct tw2804 *state = to_state_from_ctrl(ctrl); in tw2804_g_volatile_ctrl() local
179 struct i2c_client *client = v4l2_get_subdevdata(&state->sd); in tw2804_g_volatile_ctrl()
203 struct tw2804 *state = to_state_from_ctrl(ctrl); in tw2804_s_ctrl() local
204 struct i2c_client *client = v4l2_get_subdevdata(&state->sd); in tw2804_s_ctrl()
211 reg = read_reg(client, addr, state->channel); in tw2804_s_ctrl()
218 return write_reg(client, addr, reg, state->channel); in tw2804_s_ctrl()
222 reg = read_reg(client, addr, state->channel); in tw2804_s_ctrl()
226 return write_reg(client, addr, reg, state->channel); in tw2804_s_ctrl()
242 ctrl->val, state->channel); in tw2804_s_ctrl()
246 ctrl->val, state->channel); in tw2804_s_ctrl()
250 ctrl->val, state->channel); in tw2804_s_ctrl()
254 ctrl->val, state->channel); in tw2804_s_ctrl()
362 struct tw2804 *state; in tw2804_probe() local
370 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); in tw2804_probe()
371 if (state == NULL) in tw2804_probe()
373 sd = &state->sd; in tw2804_probe()
375 state->channel = -1; in tw2804_probe()
376 state->norm = V4L2_STD_NTSC; in tw2804_probe()
378 v4l2_ctrl_handler_init(&state->hdl, 10); in tw2804_probe()
379 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
381 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
383 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
385 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
387 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
389 v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
391 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
395 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
399 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
403 ctrl = v4l2_ctrl_new_std(&state->hdl, &tw2804_ctrl_ops, in tw2804_probe()
407 sd->ctrl_handler = &state->hdl; in tw2804_probe()
408 err = state->hdl.error; in tw2804_probe()
410 v4l2_ctrl_handler_free(&state->hdl); in tw2804_probe()
423 struct tw2804 *state = to_state(sd); in tw2804_remove() local
426 v4l2_ctrl_handler_free(&state->hdl); in tw2804_remove()