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: dac: dacx3608: add broadcast register for synchronized output #74633

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bbooher
Copy link

@bbooher bbooher commented Jun 20, 2024

The dacx3608 line supports a broadcast register so all configured channels can output a singular value, simultaneously. This drastically reduces I2C overhead when using multi-channel control. An API addition was necessary to support a global broadcast channel number. The API addition does not break the write_value() implementation for other DAC drivers in the repo. This change is based on an out-of-tree driver developed internally to handle this use case.

Alternative to the API change, could be a KConfig option or device tree entry. Also, no support for the Broadcast channel was added to the channel_setup() implementation - this may or may not be confusing. I believe it makes sense to maintain explicit setup calls for each channel intended to be configured.

Copy link

Hello @bbooher, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@bbooher
Copy link
Author

bbooher commented Jun 20, 2024

Partial implementation for: #73090

@bbooher bbooher changed the title drivers: sensor: dacx3608: add broadcast register support for synchro… drivers: dac: dacx3608: add broadcast register support for synchro… Jun 20, 2024
@bbooher bbooher marked this pull request as ready for review June 20, 2024 19:48
@zephyrbot zephyrbot added the area: DAC Digital-to-Analog Converter label Jun 20, 2024
@bbooher bbooher changed the title drivers: dac: dacx3608: add broadcast register support for synchro… drivers: dac: dacx3608: add broadcast register for synchronized output Jun 21, 2024
Copy link
Member

@martinjaeger martinjaeger left a comment

Choose a reason for hiding this comment

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

Thanks for your PR. Only got two minor comments.

Please be aware that we are currently in feature freeze and need to wait a couple of more days before this could get merged after approval.

include/zephyr/drivers/dac.h Outdated Show resolved Hide resolved
drivers/dac/dac_dacx3608.c Outdated Show resolved Hide resolved
@martinjaeger
Copy link
Member

@bbooher Please have a look at the failed compliance check.

…tput

The dacx3608 line supports a broadcast register so all configured channels
can output a singular value, simultaneously. This drastically reduces I2C
overhead when using multi-channel control. An API addition was necessary
to support a global broadcast channel number. The API addition does not
break the write_value() implementation for other DAC drivers in the repo.
This change is based on an out-of-tree driver developed internally to
handle this use case.

Alternative to the API change, could be a KConfig option or device tree
entry. Also, no support for the Broadcast channel was added to the
channel_setup() implementation - this may or may not be confusing. I
believe it makes sense to maintain explicit setup calls for each channel
intended to be configured.

Signed-off-by: Ben Booher <benbooher@pull-repo.com>
@bbooher
Copy link
Author

bbooher commented Jul 1, 2024

@bbooher Please have a look at the failed compliance check.

I believe it was a mismatch in git username and signed-off-by name. I used the --signoff parameter this time and re-pushed.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link
Member

@martinjaeger martinjaeger left a comment

Choose a reason for hiding this comment

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

I agree this feature can be added independent of the discussion in #73090 for synchronizing the outputs using the latch pin.

@martinjaeger
Copy link
Member

@KwonTae-young Added you as a reviewer as you have contributed another TI DAC driver in the past.

@bbooher
Copy link
Author

bbooher commented Oct 18, 2024

@martinjaeger @KwonTae-young - Bumping this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: DAC Digital-to-Analog Converter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants