Skip to content
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

drivers: led: lp5569: implement write_channels api #41

Open
wants to merge 2 commits into
base: beo/3.5.99
Choose a base branch
from

Conversation

Emil-Juhl
Copy link

See commits.

Submitted for upstream: zephyrproject-rtos#81497

The lp5569 controller supports auto-increment for its registers. This is by
default enabled in the chip, but the driver actively disabled it.

Since auto-increment is useful for writing multiple consecutive registers,
enable the feature. The driver, however, doesn't perform such consecutive
writes and thus the existing behavior is not altered.

Signed-off-by: Emil Dahl Juhl <[email protected]>
(cherry picked from commit 8a78596)

Submitted for upstream in: zephyrproject-rtos#81497
The lp5569 has multiple pwm outputs, and thus implementing the
write_channels api to set multiple values in a single call makes sense.

Implement the write_channels function with a basic range check on the
channel range.
Since the lp5569 supports auto-increment, all of the channels can be
written in one i2c transfer, starting from the pwm register of the
start_channel.

Signed-off-by: Emil Dahl Juhl <[email protected]>
(cherry picked from commit e59c459)

Submitted for upstream in: zephyrproject-rtos#81497
@Emil-Juhl
Copy link
Author

Since we are far far behind upstream main, the first commit didn't cherry-pick cleanly. But this is merely due to formatting.

Copy link

@DmtKats DmtKats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets wait a bit for the upstream review. If you really need this now we can just merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants