Home
last modified time | relevance | path

Searched refs:v4l2_flash (Results 1 – 13 of 13) sorted by relevance

/openbmc/linux/drivers/media/v4l2-core/
H A Dv4l2-flash-led-class.c17 #define has_flash_op(v4l2_flash, op) \ argument
18 (v4l2_flash && v4l2_flash->ops && v4l2_flash->ops->op)
20 #define call_flash_op(v4l2_flash, op, arg) \ argument
21 (has_flash_op(v4l2_flash, op) ? \
22 v4l2_flash->ops->op(v4l2_flash, arg) : \
79 static int v4l2_flash_set_led_brightness(struct v4l2_flash *v4l2_flash, in v4l2_flash_set_led_brightness() argument
82 struct v4l2_ctrl **ctrls = v4l2_flash->ctrls; in v4l2_flash_set_led_brightness()
86 if (has_flash_op(v4l2_flash, intensity_to_led_brightness)) in v4l2_flash_set_led_brightness()
87 brightness = call_flash_op(v4l2_flash, in v4l2_flash_set_led_brightness()
99 if (has_flash_op(v4l2_flash, led_brightness_to_intensity)) in v4l2_flash_set_led_brightness()
[all …]
/openbmc/linux/include/media/
H A Dv4l2-flash-led-class.h17 struct v4l2_flash;
44 int (*external_strobe_set)(struct v4l2_flash *v4l2_flash,
47 (struct v4l2_flash *v4l2_flash, s32 intensity);
49 (struct v4l2_flash *v4l2_flash, enum led_brightness);
81 struct v4l2_flash { struct
97 static inline struct v4l2_flash *v4l2_subdev_to_v4l2_flash( in v4l2_subdev_to_v4l2_flash()
100 return container_of(sd, struct v4l2_flash, sd); in v4l2_subdev_to_v4l2_flash()
109 static inline struct v4l2_flash *v4l2_ctrl_to_v4l2_flash(struct v4l2_ctrl *c) in v4l2_ctrl_to_v4l2_flash()
111 return container_of(c->handler, struct v4l2_flash, hdl); in v4l2_ctrl_to_v4l2_flash()
132 struct v4l2_flash *v4l2_flash_init(
[all …]
/openbmc/linux/drivers/leds/flash/
H A Dleds-aat1290.c70 struct v4l2_flash *v4l2_flash; member
374 struct v4l2_flash *v4l2_flash, in aat1290_intensity_to_brightness() argument
377 struct led_classdev_flash *fled_cdev = v4l2_flash->fled_cdev; in aat1290_intensity_to_brightness()
388 static s32 aat1290_brightness_to_intensity(struct v4l2_flash *v4l2_flash, in aat1290_brightness_to_intensity() argument
391 struct led_classdev_flash *fled_cdev = v4l2_flash->fled_cdev; in aat1290_brightness_to_intensity()
397 static int aat1290_led_external_strobe_set(struct v4l2_flash *v4l2_flash, in aat1290_led_external_strobe_set() argument
400 struct aat1290_led *led = fled_cdev_to_led(v4l2_flash->fled_cdev); in aat1290_led_external_strobe_set()
401 struct led_classdev_flash *fled_cdev = v4l2_flash->fled_cdev; in aat1290_led_external_strobe_set()
507 led->v4l2_flash = v4l2_flash_init(dev, of_fwnode_handle(sub_node), in aat1290_led_probe()
510 if (IS_ERR(led->v4l2_flash)) { in aat1290_led_probe()
[all …]
H A Dleds-qcom-flash.c129 struct v4l2_flash **v4l2_flash; member
457 static int qcom_flash_external_strobe_set(struct v4l2_flash *v4l2_flash, bool enable) in qcom_flash_external_strobe_set() argument
459 struct led_classdev_flash *fled_cdev = v4l2_flash->fled_cdev; in qcom_flash_external_strobe_set()
474 qcom_flash_intensity_to_led_brightness(struct v4l2_flash *v4l2_flash, s32 intensity) in qcom_flash_intensity_to_led_brightness() argument
476 struct led_classdev_flash *fled_cdev = v4l2_flash->fled_cdev; in qcom_flash_intensity_to_led_brightness()
487 static s32 qcom_flash_brightness_to_led_intensity(struct v4l2_flash *v4l2_flash, in qcom_flash_brightness_to_led_intensity() argument
490 struct led_classdev_flash *fled_cdev = v4l2_flash->fled_cdev; in qcom_flash_brightness_to_led_intensity()
508 struct v4l2_flash *v4l2_flash; in qcom_flash_v4l2_init() local
527 v4l2_flash = v4l2_flash_init(dev, fwnode, &led->flash, &qcom_v4l2_flash_ops, &v4l2_cfg); in qcom_flash_v4l2_init()
528 if (IS_ERR(v4l2_flash)) in qcom_flash_v4l2_init()
[all …]
H A Dleds-rt4505.c49 struct v4l2_flash *v4l2_flash; member
240 static int rt4505_flash_external_strobe_set(struct v4l2_flash *v4l2_flash, in rt4505_flash_external_strobe_set() argument
243 struct led_classdev_flash *flash = v4l2_flash->fled_cdev; in rt4505_flash_external_strobe_set()
384 priv->v4l2_flash = v4l2_flash_init(priv->dev, init_data.fwnode, in rt4505_probe()
387 if (IS_ERR(priv->v4l2_flash)) { in rt4505_probe()
389 return PTR_ERR(priv->v4l2_flash); in rt4505_probe()
400 v4l2_flash_release(priv->v4l2_flash); in rt4505_remove()
H A Dleds-mt6370-flash.c72 struct v4l2_flash *v4l2_flash; member
343 static int mt6370_flash_external_strobe_set(struct v4l2_flash *v4l2_flash, in mt6370_flash_external_strobe_set() argument
346 struct led_classdev_flash *flash = v4l2_flash->fled_cdev; in mt6370_flash_external_strobe_set()
398 static void mt6370_v4l2_flash_release(void *v4l2_flash) in mt6370_v4l2_flash_release() argument
400 v4l2_flash_release(v4l2_flash); in mt6370_v4l2_flash_release()
415 led->v4l2_flash = v4l2_flash_init(parent, fwnode, &led->flash, &v4l2_flash_ops, in mt6370_led_register()
417 if (IS_ERR(led->v4l2_flash)) in mt6370_led_register()
418 return dev_err_probe(parent, PTR_ERR(led->v4l2_flash), in mt6370_led_register()
421 return devm_add_action_or_reset(parent, mt6370_v4l2_flash_release, led->v4l2_flash); in mt6370_led_register()
H A Dleds-sgm3140.c17 struct v4l2_flash *v4l2_flash; member
268 priv->v4l2_flash = v4l2_flash_init(&pdev->dev, in sgm3140_probe()
272 if (IS_ERR(priv->v4l2_flash)) { in sgm3140_probe()
273 ret = PTR_ERR(priv->v4l2_flash); in sgm3140_probe()
290 v4l2_flash_release(priv->v4l2_flash); in sgm3140_remove()
H A Dleds-rt8515.c50 struct v4l2_flash *v4l2_flash; member
216 v4l2_flash_release(rt->v4l2_flash); in rt8515_v4l2_flash_release()
355 rt->v4l2_flash = v4l2_flash_init(dev, child, fled, NULL, &v4l2_sd_cfg); in rt8515_probe()
356 if (IS_ERR(rt->v4l2_flash)) { in rt8515_probe()
357 ret = PTR_ERR(rt->v4l2_flash); in rt8515_probe()
H A Dleds-mt6360.c80 struct v4l2_flash *v4l2_flash; member
458 static int mt6360_flash_external_strobe_set(struct v4l2_flash *v4l2_flash, in mt6360_flash_external_strobe_set() argument
461 struct led_classdev_flash *flash = v4l2_flash->fled_cdev; in mt6360_flash_external_strobe_set()
588 led->v4l2_flash = v4l2_flash_init(parent, init_data->fwnode, in mt6360_led_register()
592 if (IS_ERR(led->v4l2_flash)) { in mt6360_led_register()
595 return PTR_ERR(led->v4l2_flash); in mt6360_led_register()
769 if (led->v4l2_flash) in mt6360_v4l2_flash_release()
770 v4l2_flash_release(led->v4l2_flash); in mt6360_v4l2_flash_release()
H A Dleds-max77693.c62 struct v4l2_flash *v4l2_flash; member
821 struct v4l2_flash *v4l2_flash, in max77693_led_external_strobe_set() argument
825 flcdev_to_sub_led(v4l2_flash->fled_cdev); in max77693_led_external_strobe_set()
930 sub_led->v4l2_flash = v4l2_flash_init(dev, of_fwnode_handle(sub_node), in max77693_register_led()
933 if (IS_ERR(sub_led->v4l2_flash)) { in max77693_register_led()
934 ret = PTR_ERR(sub_led->v4l2_flash); in max77693_register_led()
1011 v4l2_flash_release(sub_leds[FLED1].v4l2_flash); in max77693_led_probe()
1025 v4l2_flash_release(sub_leds[FLED1].v4l2_flash); in max77693_led_remove()
1030 v4l2_flash_release(sub_leds[FLED2].v4l2_flash); in max77693_led_remove()
H A Dleds-as3645a.c135 struct v4l2_flash *vf;
136 struct v4l2_flash *vfind;
/openbmc/linux/drivers/staging/greybus/
H A Dlight.c57 struct v4l2_flash *v4l2_flash; member
58 struct v4l2_flash *v4l2_flash_ind;
573 light->v4l2_flash = v4l2_flash_init(dev, NULL, fled, &v4l2_flash_ops, in gb_lights_light_v4l2_register()
575 if (IS_ERR(light->v4l2_flash)) in gb_lights_light_v4l2_register()
576 return PTR_ERR(light->v4l2_flash); in gb_lights_light_v4l2_register()
582 v4l2_flash_release(light->v4l2_flash); in gb_lights_light_v4l2_register()
593 v4l2_flash_release(light->v4l2_flash); in gb_lights_light_v4l2_unregister()
/openbmc/linux/Documentation/leds/
H A Dleds-class-flash.rst78 argument - struct v4l2_flash pointer returned previously by v4l2_flash_init.