Analog Devices AS3645A LED Controller

Schema identifier ($id): "http://devicetree.org/schemas/leds/ams,as3645a.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Sakari Ailus <sakari.ailus@iki.fi>"

The AS3645A flash LED controller can drive two LEDs, one high current flash LED and one indicator LED. The high current flash LED can be used in torch mode as well.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "ams,as3645a"

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 0

reg — required here #

Maximum number of items (maxItems): 1

led@0 — not listed as required here #

led0 describes the 'flash' feature

Value type (type): "object"

Shared schema rule ($ref): common.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

Exact value (const): 0

flash-timeout-us — required here

Minimum value (minimum): 100000

Maximum value (maximum): 850000

Multiple of (multipleOf): 50000

flash-max-microamp — required here

Minimum value (minimum): 200000

Maximum value (maximum): 500000

Multiple of (multipleOf): 20000

led-max-microamp — required here

Minimum value (minimum): 20000

Maximum value (maximum): 160000

Multiple of (multipleOf): 20000

Maximum current when in torch (assist) mode.

ams,input-max-microamp — required here

Minimum value (minimum): 1250000

Maximum value (maximum): 2000000

Multiple of (multipleOf): 50000

Required in this object (required): "reg", "flash-timeout-us", "flash-max-microamp", "led-max-microamp", "ams,input-max-microamp"

led@1 — not listed as required here #

led1 describes the 'indicator' feature

Value type (type): "object"

Shared schema rule ($ref): common.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

Exact value (const): 1

led-max-microamp — required here

Allowed values (enum): 2500, 5000, 7500, 10000

Maximum indicator current.

Required in this object (required): "reg", "led-max-microamp"

Required in this object (required): "compatible", "reg", "#size-cells", "#address-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/leds/common.h>

i2c{
    #address-cells = <1>;
    #size-cells = <0>;

    led-controller@30 {
        compatible = "ams,as3645a";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x30>;

        led@0 {
            reg = <0>;
            flash-timeout-us = <150000>;
            flash-max-microamp = <320000>;
            led-max-microamp = <60000>;
            ams,input-max-microamp = <1750000>;
            function = LED_FUNCTION_FLASH;
        };

        led@1 {
            reg = <1>;
            led-max-microamp = <10000>;
            function = LED_FUNCTION_INDICATOR;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page