Documentation/leds/leds-lp5523.rst

Source file repositories/reference/linux-study-clean/Documentation/leds/leds-lp5523.rst

File Facts

System
Linux kernel
Corpus path
Documentation/leds/leds-lp5523.rst
Extension
.rst
Size
3510 bytes
Lines
148
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

========================
Kernel driver for lp5523
========================

* National Semiconductor LP5523 led driver chip
* Datasheet: http://www.national.com/pf/LP/LP5523.html

Authors: Mathias Nyman, Yuri Zaporozhets, Samu Onkalo
Contact: Samu Onkalo (samu.p.onkalo-at-nokia.com)

Description
-----------
LP5523 can drive up to 9 channels. Leds can be controlled directly via
the led class control interface.
The name of each channel is configurable in the platform data - name and label.
There are three options to make the channel name.

a) Define the 'name' in the platform data

To make specific channel name, then use 'name' platform data.

- /sys/class/leds/R1               (name: 'R1')
- /sys/class/leds/B1               (name: 'B1')

b) Use the 'label' with no 'name' field

For one device name with channel number, then use 'label'.
- /sys/class/leds/RGB:channelN     (label: 'RGB', N: 0 ~ 8)

c) Default

If both fields are NULL, 'lp5523' is used by default.
- /sys/class/leds/lp5523:channelN  (N: 0 ~ 8)

LP5523 has the internal program memory for running various LED patterns.
There are two ways to run LED patterns.

1) sysfs interface - enginex_mode, enginex_load and enginex_leds

  Control interface for the engines:

  x is 1 .. 3

  enginex_mode:
	disabled, load, run
  enginex_load:
	microcode load
  enginex_leds:
	led mux control

  ::

	cd /sys/class/leds/lp5523:channel2/device
	echo "load" > engine3_mode
	echo "9d80400004ff05ff437f0000" > engine3_load
	echo "111111111" > engine3_leds
	echo "run" > engine3_mode

  To stop the engine::

	echo "disabled" > engine3_mode

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.

Annotation

Implementation Notes