From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kyungmin.park@samsung.com, b.zolnierkie@samsung.com,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>
Subject: [PATCH/RFC v5 02/10] Documentation: leds: Add description of Flash Manager
Date: Wed, 20 Aug 2014 15:44:11 +0200 [thread overview]
Message-ID: <1408542259-415-3-git-send-email-j.anaszewski@samsung.com> (raw)
In-Reply-To: <1408542259-415-1-git-send-email-j.anaszewski@samsung.com>
The documentation being added contains overall description
of the Flash Manager functionality and the related sysfs
attributes.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
---
Documentation/leds/leds-class-flash.txt | 64 +++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/Documentation/leds/leds-class-flash.txt b/Documentation/leds/leds-class-flash.txt
index 8a9c17e..417b984 100644
--- a/Documentation/leds/leds-class-flash.txt
+++ b/Documentation/leds/leds-class-flash.txt
@@ -52,3 +52,67 @@ exposes a number of V4L2 controls. When the V4L2_CID_FLASH_LED_MODE control
is set to V4L2_FLASH_LED_MODE_TORCH or V4L2_FLASH_LED_MODE_FLASH the
LED subsystem sysfs interface becomes unavailable. The interface can be
unlocked by setting the mode back to V4L2_FLASH_LED_MODE_NONE.
+
+
+Flash Manager
+=============
+
+Flash LED devices often provide two ways of strobing the flash: software
+(e.g. by setting a bit in a register) and hardware, by asserting dedicated pin,
+which is usually connected to a camera sensor device. There are also flash led
+devices which support only hardware strobing - in such cases a multiplexer
+device is employed to route the flash strobe signal either from the SoC GPIO or
+from the external strobe signal provider, e.g. camera sensor.
+Use of multiplexers allows also to change the flash-sensor connection
+dynamically if there is more than one flash or external strobe signal provider
+available on the board.
+
+In order to address the aforementioned cases the Flash Manager functionality
+has been introduced. Flash Manager is a part of the LED Flash Class.
+It maintains information about flashes, software and external strobe signal
+providers and multiplexers that route strobe signals among them.
+Flash Manager becomes available after defining CONFIG_LEDS_FLASH_MANAGER
+symbol in the kernel config.
+
+A flash led device is registered in the Flash Manager only if its Device Tree
+node contains information about the topology of strobe signals that can be
+routed to the device. The related device node has to be passed int the third
+argument to the led_classdev_flash_register function.
+The device_node is expected to include one gate-software-strobe subnode and
+at least one gate-external-strobeN subnode. Besides that there must defined
+a flash_muxes node aggregating all the multiplexers that can be referenced
+by the flash led devices. (for mote details see Documentation/devicetree/
+bindings/leds/ leds-flash-manager.txt).
+
+Flash manager adds following sysfs attributes to the LED Flash Clash
+device sysfs interface:
+
+ - strobe_provider - id of the external strobe signal provider associated
+ with the flash led device. It is created only if
+ there is more than one external strobe signal
+ provider defined (RW).
+ - strobe_providerN - names of the strobe signal providers available
+ for the flash led device, where N is the
+ identifier of a strobe signal provider (RO)
+
+
+LED Flash Class multiplexers
+============================
+
+Multiplexers are an indispensable part of the Flash Manager. Flash Manager has
+its own led_flash_gpio_mux* helpers for creating, releasing and operating on
+the simple gpio driven multiplexers (the ones whose lines are selected by
+changing the state of its selector pins).
+
+It is however possible that a more advanced device will be used for routing
+strobe signals. This kind of devices are known to the Flash Manager as
+"asynchronous muxes" and can be registered in arbitrary moment with use of
+led_flash_manager_bind_async_mux API and unregistered with
+led_flash_manager_unbind_async_mux. (see Documentation/leds/leds-async-mux.c
+for the exemplary implementation of the async mux driver).
+
+If a LED Flash Class device declares dependency on an async mux, then strobing
+the flash, or setting external strobe, will succeed only wnen the async mux
+has been bound to the Flash Manager. Async mux module, once bound, can be
+removed only after all LED Flash Class devices using it are unregistered
+from the Flash Manager.
--
1.7.9.5
next prev parent reply other threads:[~2014-08-20 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 13:44 [PATCH/RFC v5 00/10] LED / flash API integration - documentation Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 01/10] Documentation: leds: Add description of LED Flash Class extension Jacek Anaszewski
2014-08-20 13:44 ` Jacek Anaszewski [this message]
2014-08-20 13:44 ` [PATCH/RFC v5 03/10] Documentation: leds: add exemplary asynchronous mux driver Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 04/10] DT: leds: Add flash led devices related properties Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 05/10] DT: Add documentation for LED Class Flash Manger Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 06/10] DT: Add documentation for exynos4-is 'flashes' property Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 07/10] DT: Add documentation for the mfd Maxim max77693 Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 08/10] of: Add Skyworks Solutions, Inc. vendor prefix Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 09/10] DT: Add documentation for the Skyworks AAT1290 Jacek Anaszewski
2014-08-20 13:44 ` [PATCH/RFC v5 10/10] ARM: dts: add aat1290 current regulator device node Jacek Anaszewski
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=1408542259-415-3-git-send-email-j.anaszewski@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=cooloney@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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
all inboxes | Powered by JetHome®