-
Notifications
You must be signed in to change notification settings - Fork 908
Add LTC3220 driver #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
edelweiseescala
wants to merge
4
commits into
analogdevicesinc:main
Choose a base branch
from
edelweiseescala:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+707
−0
Open
Add LTC3220 driver #3005
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
069af87
dt-bindings: leds: ltc3220: Document LTC3220 18 channel LED Driver
edelweiseescala 714fdc9
leds: ltc3220: Documentation for Custom ABI
edelweiseescala 6ae2614
leds: ltc3220: add driver
edelweiseescala b251647
leds: Kconfig.adi: imply ltc3220
edelweiseescala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| What: /sys/class/leds/<led>/shutdown | ||
| Date: November 2025 | ||
| Contact: Edelweise Escala <edelweise.escala@analog.com> | ||
| Description: LTC3220 shutdown command. If you write 1 it | ||
| shuts down part while preserving data in registers. | ||
| If you write 0 device is in normal operation. | ||
|
|
||
| What: /sys/class/leds/<led>/force_cpo_mode | ||
| Date: November 2025 | ||
| Contact: Edelweise Escala <edelweise.escala@analog.com> | ||
| Description: LTC3220 force charge pump settings (0..3): | ||
| 0 - Enables mode logic to control mode changes based on dropout signal | ||
| 1 - Forces charge pump into 1.5x mode | ||
| 2 - Forces charge pump into 2x mode | ||
| 3 - Forces charge pump into 1x mode | ||
|
|
||
| What: /sys/class/leds/<led>/quick_write | ||
| Date: November 2025 | ||
| Contact: Edelweise Escala <edelweise.escala@analog.com> | ||
| Description: LTC3220 quick_write setting. LTC3220 has a quick write configuration | ||
| which allows parallel write on all 18 LED registers, when data is being written on | ||
| REG1. If you write 1 quick_write is enabled, 0 to disable. | ||
|
|
||
| What: /sys/class/leds/<led>/gradation_speed | ||
| Date: November 2025 | ||
| Contact: Edelweise Escala <edelweise.escala@analog.com> | ||
| Description: LTC3220 gradation speed (0..3) where: | ||
| 0 - disabled | ||
| 1 - Ramp time of 0.24s and Period of 0.313s | ||
| 2 - Ramp time of 0.48s and Period of 0.625s | ||
| 3 - Ramp time of 0.96s and Period of 1.25s | ||
|
|
||
| What: /sys/class/leds/<led>/gradation_is_increasing | ||
| Date: November 2025 | ||
| Contact: Edelweise Escala <edelweise.escala@analog.com> | ||
| Description: LTC3220 gradation increasing command. This sets if gradation | ||
| will ramp up or down. If you write 1 it gradation will ramp up, 0 will | ||
| ramp down. | ||
|
|
||
| What: /sys/class/leds/<led>/blink_cfg | ||
| Date: November 2025 | ||
| Contact: Edelweise Escala <edelweise.escala@analog.com> | ||
| Description: LTC3220 device blink setting. The blink settings for all LEDs | ||
| (0..3) where: | ||
| 0 - On Time of 0.625s and Period of 1.25s | ||
| 1 - On Time of 0.156s and Period of 1.25s | ||
| 2 - On Time of 0.625s and Period of 2.5s | ||
| 3 - On Time of 0.156s and Period of 2.5s |
114 changes: 114 additions & 0 deletions
114
Documentation/devicetree/bindings/leds/leds-ltc3220.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/leds/leds-ltc3220.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Analog Devices LTC3220 LED Drivers | ||
|
|
||
| maintainers: | ||
| - Edelweise Escala <edelweise.escala@analog.com> | ||
|
|
||
| description: Bindings for the Analog Devices LTC3220 18 channel LED Drivers. | ||
|
|
||
| For more product information please see the link below | ||
| https://www.analog.com/en/products/ltc3220.html | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - adi,ltc3220 | ||
| - adi,ltc3220-1 | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| '#address-cells': | ||
| const: 1 | ||
|
|
||
| '#size-cells': | ||
| const: 0 | ||
|
|
||
| reset-gpios: | ||
| maxItems: 1 | ||
| description: GPIO attached to the chip's reset pin | ||
|
|
||
| patternProperties: | ||
| "(^led@([1-9]|1[0-8])$|led)": | ||
| type: object | ||
| $ref: common.yaml# | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you need |
||
| unevaluatedProperties: false | ||
| properties: | ||
| reg: | ||
| description: Output channel for the LED. reg value to output to LED output number | ||
| enum: | ||
| - 1 # LED output D1 | ||
| - 2 # LED output D2 | ||
| - 3 # LED output D3 | ||
| - 4 # LED output D4 | ||
| - 5 # LED output D5 | ||
| - 6 # LED output D6 | ||
| - 7 # LED output D7 | ||
| - 8 # LED output D8 | ||
| - 9 # LED output D9 | ||
| - 10 # LED output D10 | ||
| - 11 # LED output D11 | ||
| - 12 # LED output D12 | ||
| - 13 # LED output D13 | ||
| - 14 # LED output D14 | ||
| - 15 # LED output D15 | ||
| - 16 # LED output D16 | ||
| - 17 # LED output D17 | ||
| - 18 # LED output D18 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess the reg property is |
||
| required: | ||
| - reg | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - reset-gpios | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/leds/common.h> | ||
|
|
||
| i2c { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| led-controller@1c { | ||
| compatible = "adi,ltc3220"; | ||
| reg = <0x1c>; | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| reset-gpios = <&gpio 17 0>; | ||
|
|
||
| led@1 { | ||
| reg = <1>; | ||
| }; | ||
|
|
||
| led@2 { | ||
| reg = <2>; | ||
| }; | ||
|
|
||
| led@3 { | ||
| reg = <3>; | ||
| }; | ||
|
|
||
| led@4 { | ||
| reg = <4>; | ||
| }; | ||
|
|
||
| led@5 { | ||
| reg = <5>; | ||
| }; | ||
|
|
||
| led@6 { | ||
| reg = <6>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just regarding the commit subject. Don't say "add bindings". That is pretty obvious. Instead something like "Document LTC3220 18 channel LED Driver"