Skip to content

Conversation

@deganii
Copy link

@deganii deganii commented Oct 16, 2024

This PR adds support for the LTC-268X series of DACs:

These DACs have 8/16 channels (LTC-2686and LTC-2688 respectively) at 12/16 bit resolution. AD has made an eval board available for prototyping (DC2873A-B)

MFG_DC2873A-B

The driver was tested using an NRF52833 eval board and responds correctly to commands on the SPI bus:

Screenshot 2024-10-15 at 7 43 48 PM

Product Home:
https://www.analog.com/en/products/ltc2688.html

The driver is adapted from the LTC's No-OS driver, following the same conventions as the Zephyr LTC166x driver:

No-OS Driver:
https://github.com/analogdevicesinc/no-OS/blob/main/drivers/dac/ltc268x/ltc268x.c

LTC166x HowTo:
https://www.marcusfolkesson.se/blog/write-a-device-driver-for-zephyr-part1/

Signed-off-by: Ismail Degani [email protected]

This commit adds support for the LTC-268X series of DACs:

Product Home:
https://www.analog.com/en/products/ltc2688.html

The driver is adapted from the LTC's no-op driver, following the same conventions as the Zephyr LTC166x driver:

No-OS Driver:
https://github.com/analogdevicesinc/no-OS/blob/main/drivers/dac/ltc268x/ltc268x.c

LTC166x HowTo:
https://www.marcusfolkesson.se/blog/write-a-device-driver-for-zephyr-part1/
@zephyrbot zephyrbot added the area: DAC Digital-to-Analog Converter label Oct 16, 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.

Hi @deganii and thanks for your PR.

I really appreciate that you provided a link to related information and some details about testing of your code. That helps a lot with reviewing.

Unfortunately, there are some compliance issues with this PR. Most importantly, code contributed to Zephyr needs to be Apache 2.0 licensed. The original license looks like BSD with some further restrictions, so I don't think that's acceptable.
In addition to that, the coding style needs some further adjustments (see also style check results in CI).

You could either ask Analog Devices (CC @MaureenHelm @microbuilder) if they allow you to re-license the code under Apache 2.0 or you will have to rewrite the code yourself from scratch and re-submit it under Apache 2.0 license.

@kartben
Copy link
Contributor

kartben commented Dec 6, 2024

@deganii I am closing this PR but feel free to re-open at a later date when/if you are able to address the points raised by @martinjaeger

@kartben kartben closed this Dec 6, 2024
@MaureenHelm
Copy link
Member

Sorry I missed this earlier. Rather than copying the No-OS driver into the Zephyr tree and modifying it, I think we'll eventually import No-OS drivers as a module.

@MaureenHelm MaureenHelm added the platform: ADI Analog Devices, Inc. label Dec 6, 2024
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 platform: ADI Analog Devices, Inc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants