From: Bryan Wu <cooloney@gmail.com>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Linux LED Subsystem <linux-leds@vger.kernel.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
Pavel Machek <pavel@ucw.cz>,
"rpurdie@rpsys.net" <rpurdie@rpsys.net>,
Sakari Ailus <sakari.ailus@iki.fi>,
Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: Re: [PATCH v10 1/8] Documentation: leds: Add description of v4l2-flash sub-device
Date: Wed, 10 Jun 2015 11:21:07 -0700 [thread overview]
Message-ID: <CAK5ve-JDncP+f89svGw-yugaJb1o-Ywr-ngf0ejnw7FS1amrag@mail.gmail.com> (raw)
In-Reply-To: <1433754145-12765-2-git-send-email-j.anaszewski@samsung.com>
On Mon, Jun 8, 2015 at 2:02 AM, Jacek Anaszewski
<j.anaszewski@samsung.com> wrote:
> This patch extends LED Flash class documention by
> the description of interactions with v4l2-flash sub-device.
>
Merged into my -devel branch and it won't be merged into 4.2.0 merge
window but wait for one more cycle, since now it's quite late in 4.1.0
cycle.
Thanks,
-Bryan
> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Richard Purdie <rpurdie@rpsys.net>
> ---
> Documentation/leds/leds-class-flash.txt | 51 +++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/Documentation/leds/leds-class-flash.txt b/Documentation/leds/leds-class-flash.txt
> index 19bb673..8da3c6f 100644
> --- a/Documentation/leds/leds-class-flash.txt
> +++ b/Documentation/leds/leds-class-flash.txt
> @@ -20,3 +20,54 @@ Following sysfs attributes are exposed for controlling flash LED devices:
> - max_flash_timeout
> - flash_strobe
> - flash_fault
> +
> +
> +V4L2 flash wrapper for flash LEDs
> +=================================
> +
> +A LED subsystem driver can be controlled also from the level of VideoForLinux2
> +subsystem. In order to enable this CONFIG_V4L2_FLASH_LED_CLASS symbol has to
> +be defined in the kernel config.
> +
> +The driver must call the v4l2_flash_init function to get registered in the
> +V4L2 subsystem. The function takes six arguments:
> +- dev : flash device, e.g. an I2C device
> +- of_node : of_node of the LED, may be NULL if the same as device's
> +- fled_cdev : LED flash class device to wrap
> +- iled_cdev : LED flash class device representing indicator LED associated with
> + fled_cdev, may be NULL
> +- ops : V4L2 specific ops
> + * external_strobe_set - defines the source of the flash LED strobe -
> + V4L2_CID_FLASH_STROBE control or external source, typically
> + a sensor, which makes it possible to synchronise the flash
> + strobe start with exposure start,
> + * intensity_to_led_brightness and led_brightness_to_intensity - perform
> + enum led_brightness <-> V4L2 intensity conversion in a device
> + specific manner - they can be used for devices with non-linear
> + LED current scale.
> +- config : configuration for V4L2 Flash sub-device
> + * dev_name - the name of the media entity, unique in the system,
> + * flash_faults - bitmask of flash faults that the LED flash class
> + device can report; corresponding LED_FAULT* bit definitions are
> + available in <linux/led-class-flash.h>,
> + * torch_intensity - constraints for the LED in TORCH mode
> + in microamperes,
> + * indicator_intensity - constraints for the indicator LED
> + in microamperes,
> + * has_external_strobe - determines whether the flash strobe source
> + can be switched to external,
> +
> +On remove the v4l2_flash_release function has to be called, which takes one
> +argument - struct v4l2_flash pointer returned previously by v4l2_flash_init.
> +This function can be safely called with NULL or error pointer argument.
> +
> +Please refer to drivers/leds/leds-max77693.c for an exemplary usage of the
> +v4l2 flash wrapper.
> +
> +Once the V4L2 sub-device is registered by the driver which created the Media
> +controller device, the sub-device node acts just as a node of a native V4L2
> +flash API device would. The calls are simply routed to the LED flash API.
> +
> +Opening the V4L2 flash sub-device makes the LED subsystem sysfs interface
> +unavailable. The interface is re-enabled after the V4L2 flash sub-device
> +is closed.
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2015-06-10 18:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 9:02 [PATCH v10 0/8] LED / flash API integration Jacek Anaszewski
2015-06-08 9:02 ` [PATCH v10 1/8] Documentation: leds: Add description of v4l2-flash sub-device Jacek Anaszewski
2015-06-10 18:21 ` Bryan Wu [this message]
2015-06-08 9:02 ` [PATCH v10 2/8] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2015-06-10 17:57 ` Bryan Wu
2015-06-10 18:01 ` Bryan Wu
2015-06-10 18:12 ` Bryan Wu
2015-06-10 18:29 ` Pavel Machek
2015-06-10 21:34 ` Sakari Ailus
2015-06-10 21:39 ` Bryan Wu
2015-06-10 21:55 ` Sakari Ailus
2015-06-08 9:02 ` [PATCH v10 3/8] leds: max77693: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-06-10 18:12 ` Bryan Wu
2015-06-08 9:02 ` [PATCH v10 4/8] DT: aat1290: Document handling external strobe sources Jacek Anaszewski
2015-06-10 18:12 ` Bryan Wu
2015-06-08 9:02 ` [PATCH v10 5/8] leds: aat1290: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-06-10 18:12 ` Bryan Wu
2015-06-08 9:02 ` [PATCH v10 6/8] exynos4-is: Improve the mechanism of async subdevs verification Jacek Anaszewski
2015-06-10 18:17 ` Bryan Wu
2015-06-08 9:02 ` [PATCH v10 7/8] DT: Add documentation for exynos4-is 'flashes' property Jacek Anaszewski
[not found] ` <1433754145-12765-8-git-send-email-j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-06-10 18:18 ` Bryan Wu
2015-06-08 9:02 ` [PATCH v10 8/8] exynos4-is: Add support for v4l2-flash subdevs Jacek Anaszewski
2015-06-10 18:18 ` Bryan Wu
2015-06-09 8:59 ` [PATCH v10 0/8] LED / flash API integration Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK5ve-JDncP+f89svGw-yugaJb1o-Ywr-ngf0ejnw7FS1amrag@mail.gmail.com \
--to=cooloney@gmail.com \
--cc=j.anaszewski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).