summaryrefslogtreecommitdiffstats
path: root/kernel/Documentation/leds
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/Documentation/leds
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/Documentation/leds')
-rw-r--r--kernel/Documentation/leds/leds-class-flash.txt51
-rw-r--r--kernel/Documentation/leds/leds-class.txt3
-rw-r--r--kernel/Documentation/leds/leds-lp5523.txt30
3 files changed, 81 insertions, 3 deletions
diff --git a/kernel/Documentation/leds/leds-class-flash.txt b/kernel/Documentation/leds/leds-class-flash.txt
index 19bb67355..8da3c6f4b 100644
--- a/kernel/Documentation/leds/leds-class-flash.txt
+++ b/kernel/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.
diff --git a/kernel/Documentation/leds/leds-class.txt b/kernel/Documentation/leds/leds-class.txt
index 79699c200..62261c040 100644
--- a/kernel/Documentation/leds/leds-class.txt
+++ b/kernel/Documentation/leds/leds-class.txt
@@ -2,9 +2,6 @@
LED handling under Linux
========================
-If you're reading this and thinking about keyboard leds, these are
-handled by the input subsystem and the led class is *not* needed.
-
In its simplest form, the LED class just allows control of LEDs from
userspace. LEDs appear in /sys/class/leds/. The maximum brightness of the
LED is defined in max_brightness file. The brightness file will set the brightness
diff --git a/kernel/Documentation/leds/leds-lp5523.txt b/kernel/Documentation/leds/leds-lp5523.txt
index 5b3e91d4a..0dbbd279c 100644
--- a/kernel/Documentation/leds/leds-lp5523.txt
+++ b/kernel/Documentation/leds/leds-lp5523.txt
@@ -49,6 +49,36 @@ There are two ways to run LED patterns.
2) Firmware interface - LP55xx common interface
For the details, please refer to 'firmware' section in leds-lp55xx.txt
+LP5523 has three master faders. If a channel is mapped to one of
+the master faders, its output is dimmed based on the value of the master
+fader.
+
+For example,
+
+ echo "123000123" > master_fader_leds
+
+creates the following channel-fader mappings:
+
+ channel 0,6 to master_fader1
+ channel 1,7 to master_fader2
+ channel 2,8 to master_fader3
+
+Then, to have 25% of the original output on channel 0,6:
+
+ echo 64 > master_fader1
+
+To have 0% of the original output (i.e. no output) channel 1,7:
+
+ echo 0 > master_fader2
+
+To have 100% of the original output (i.e. no dimming) on channel 2,8:
+
+ echo 255 > master_fader3
+
+To clear all master fader controls:
+
+ echo "000000000" > master_fader_leds
+
Selftest uses always the current from the platform data.
Each channel contains led current settings.