Documentation/leds/leds-lp55xx.rst

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

File Facts

System
Linux kernel
Corpus path
Documentation/leds/leds-lp55xx.rst
Extension
.rst
Size
6837 bytes
Lines
225
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

=================================================
LP5521/LP5523/LP55231/LP5562/LP8501 Common Driver
=================================================

Authors: Milo(Woogyom) Kim <milo.kim@ti.com>

Description
-----------
LP5521, LP5523/55231, LP5562 and LP8501 have common features as below.

  Register access via the I2C
  Device initialization/deinitialization
  Create LED class devices for multiple output channels
  Device attributes for user-space interface
  Program memory for running LED patterns

The LP55xx common driver provides these features using exported functions.

  lp55xx_init_device() / lp55xx_deinit_device()
  lp55xx_register_leds() / lp55xx_unregister_leds()
  lp55xx_register_sysfs() / lp55xx_unregister_sysfs()

( Driver Structure Data )

In lp55xx common driver, two different data structure is used.

* lp55xx_led
    control multi output LED channels such as led current, channel index.
* lp55xx_chip
    general chip control such like the I2C and platform data.

For example, LP5521 has maximum 3 LED channels.
LP5523/55231 has 9 output channels::

  lp55xx_chip for LP5521 ... lp55xx_led #1
			     lp55xx_led #2
			     lp55xx_led #3

  lp55xx_chip for LP5523 ... lp55xx_led #1
			     lp55xx_led #2
				   .
				   .
			     lp55xx_led #9

( Chip Dependent Code )

To support device specific configurations, special structure
'lpxx_device_config' is used.

  - Maximum number of channels
  - Reset command, chip enable command
  - Chip specific initialization
  - Brightness control register access
  - Setting LED output current
  - Program memory address access for running patterns
  - Additional device specific attributes

( Firmware Interface )

LP55xx family devices have the internal program memory for running
various LED patterns.

This pattern data is saved as a file in the user-land or
hex byte string is written into the memory through the I2C.

LP55xx common driver supports the firmware interface.

LP55xx chips have three program engines.

To load and run the pattern, the programming sequence is following.

Annotation

Implementation Notes