Lines Matching refs:ctrls
85 struct v4l2_ctrl **ctrls = v4l2_flash->ctrls; in v4l2_flash_set_led_brightness() local
106 if (ctrl == ctrls[TORCH_INTENSITY]) { in v4l2_flash_set_led_brightness()
107 if (ctrls[LED_MODE]->val != V4L2_FLASH_LED_MODE_TORCH) in v4l2_flash_set_led_brightness()
121 struct v4l2_ctrl **ctrls = v4l2_flash->ctrls; in v4l2_flash_update_led_brightness() local
125 if (ctrl == ctrls[TORCH_INTENSITY]) { in v4l2_flash_update_led_brightness()
132 if (ctrls[LED_MODE]->val != V4L2_FLASH_LED_MODE_TORCH) in v4l2_flash_update_led_brightness()
189 static bool __software_strobe_mode_inactive(struct v4l2_ctrl **ctrls) in __software_strobe_mode_inactive() argument
191 return ((ctrls[LED_MODE]->val != V4L2_FLASH_LED_MODE_FLASH) || in __software_strobe_mode_inactive()
192 (ctrls[STROBE_SOURCE] && (ctrls[STROBE_SOURCE]->val != in __software_strobe_mode_inactive()
201 struct v4l2_ctrl **ctrls = v4l2_flash->ctrls; in v4l2_flash_s_ctrl() local
214 if (ctrls[STROBE_SOURCE]) { in v4l2_flash_s_ctrl()
215 external_strobe = (ctrls[STROBE_SOURCE]->val == in v4l2_flash_s_ctrl()
224 if (ctrls[STROBE_SOURCE]) { in v4l2_flash_s_ctrl()
237 ctrls[TORCH_INTENSITY]); in v4l2_flash_s_ctrl()
249 if (ctrls[LED_MODE]->val != V4L2_FLASH_LED_MODE_FLASH) in v4l2_flash_s_ctrl()
255 if (__software_strobe_mode_inactive(ctrls)) in v4l2_flash_s_ctrl()
259 if (__software_strobe_mode_inactive(ctrls)) in v4l2_flash_s_ctrl()
416 v4l2_flash->ctrls = devm_kzalloc(v4l2_flash->sd.dev, in v4l2_flash_init_controls()
417 sizeof(*v4l2_flash->ctrls) * in v4l2_flash_init_controls()
419 if (!v4l2_flash->ctrls) in v4l2_flash_init_controls()
462 v4l2_flash->ctrls[i] = ctrl; in v4l2_flash_init_controls()
486 struct v4l2_ctrl **ctrls = v4l2_flash->ctrls; in __sync_device_with_v4l2_controls() local
489 v4l2_flash_set_led_brightness(v4l2_flash, ctrls[TORCH_INTENSITY]); in __sync_device_with_v4l2_controls()
491 if (ctrls[INDICATOR_INTENSITY]) in __sync_device_with_v4l2_controls()
493 ctrls[INDICATOR_INTENSITY]); in __sync_device_with_v4l2_controls()
495 if (ctrls[FLASH_TIMEOUT]) { in __sync_device_with_v4l2_controls()
497 ctrls[FLASH_TIMEOUT]->val); in __sync_device_with_v4l2_controls()
502 if (ctrls[FLASH_INTENSITY]) { in __sync_device_with_v4l2_controls()
504 ctrls[FLASH_INTENSITY]->val); in __sync_device_with_v4l2_controls()
515 if (ctrls[STROBE_SOURCE] && in __sync_device_with_v4l2_controls()
516 ctrls[LED_MODE]->val != V4L2_FLASH_LED_MODE_TORCH) in __sync_device_with_v4l2_controls()
518 ctrls[STROBE_SOURCE]->val); in __sync_device_with_v4l2_controls()
589 if (v4l2_flash->ctrls[STROBE_SOURCE]) in v4l2_flash_close()
590 ret = v4l2_ctrl_s_ctrl(v4l2_flash->ctrls[STROBE_SOURCE], in v4l2_flash_close()