Lines Matching refs:ctrl

324 static int as3645a_get_ctrl(struct v4l2_ctrl *ctrl)  in as3645a_get_ctrl()  argument
327 container_of(ctrl->handler, struct as3645a, ctrls); in as3645a_get_ctrl()
331 switch (ctrl->id) { in as3645a_get_ctrl()
337 ctrl->cur.val = 0; in as3645a_get_ctrl()
339 ctrl->cur.val |= V4L2_FLASH_FAULT_SHORT_CIRCUIT; in as3645a_get_ctrl()
341 ctrl->cur.val |= V4L2_FLASH_FAULT_OVER_TEMPERATURE; in as3645a_get_ctrl()
343 ctrl->cur.val |= V4L2_FLASH_FAULT_TIMEOUT; in as3645a_get_ctrl()
345 ctrl->cur.val |= V4L2_FLASH_FAULT_OVER_VOLTAGE; in as3645a_get_ctrl()
347 ctrl->cur.val |= V4L2_FLASH_FAULT_OVER_CURRENT; in as3645a_get_ctrl()
349 ctrl->cur.val |= V4L2_FLASH_FAULT_INDICATOR; in as3645a_get_ctrl()
354 ctrl->cur.val = 0; in as3645a_get_ctrl()
362 ctrl->cur.val = value; in as3645a_get_ctrl()
366 dev_dbg(&client->dev, "G_CTRL %08x:%d\n", ctrl->id, ctrl->cur.val); in as3645a_get_ctrl()
371 static int as3645a_set_ctrl(struct v4l2_ctrl *ctrl) in as3645a_set_ctrl() argument
374 container_of(ctrl->handler, struct as3645a, ctrls); in as3645a_set_ctrl()
378 dev_dbg(&client->dev, "S_CTRL %08x:%d\n", ctrl->id, ctrl->val); in as3645a_set_ctrl()
386 switch (ctrl->id) { in as3645a_set_ctrl()
395 flash->led_mode = ctrl->val; in as3645a_set_ctrl()
399 flash->strobe_source = ctrl->val; in as3645a_set_ctrl()
420 flash->timeout = ctrl->val; in as3645a_set_ctrl()
429 flash->flash_current = (ctrl->val - AS3645A_FLASH_INTENSITY_MIN) in as3645a_set_ctrl()
440 (ctrl->val - AS3645A_TORCH_INTENSITY_MIN) in as3645a_set_ctrl()
454 (ctrl->val - AS3645A_INDICATOR_INTENSITY_MIN) in as3645a_set_ctrl()
461 if ((ctrl->val == 0) == (ctrl->cur.val == 0)) in as3645a_set_ctrl()
719 struct v4l2_ctrl *ctrl; in as3645a_init_controls() local
747 ctrl = v4l2_ctrl_new_std(&flash->ctrls, &as3645a_ctrl_ops, in as3645a_init_controls()
749 if (ctrl != NULL) in as3645a_init_controls()
750 ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; in as3645a_init_controls()
793 ctrl = v4l2_ctrl_new_std(&flash->ctrls, &as3645a_ctrl_ops, in as3645a_init_controls()
799 if (ctrl != NULL) in as3645a_init_controls()
800 ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; in as3645a_init_controls()