Skip to contentSkip to conversation

iio dac drivers : imposing upper limit on value.

DISCUSSION Philippe De Muyter 2 participants 2 messages Feb 3, 2023 IIO

lore
Share & tools
lore
#0 lore raw

Hello,

the board I work with incorporates two DAC's, but the hardware men told me that I may not use the full range of the values allowed by the DAC component in order to save the lifetime of the chips (LEDs) that are feeded by the DAC. My specific case is that the DAC has a 2.5V Vref, but the output accepts maximum 1.24V.

I would like to describe that limit in the DT and enforce it in the driver. Is there an agreed upon property for that, and a sysfs value to show it to the user ?

Best regards

Philippe

Signature · 1 line
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
#1 lore raw
Quoted 11 lines · On Fri, 3 Feb 2023 15:12:12 +0100 Philippe De Muyter <[email protected]> wrote:

Hello,

the board I work with incorporates two DAC's, but the hardware men told me that I may not use the full range of the values allowed by the DAC component in order to save the lifetime of the chips (LEDs) that are feeded by the DAC. My specific case is that the DAC has a 2.5V Vref, but the output accepts maximum 1.24V.

I would like to describe that limit in the DT and enforce it in the driver. Is there an agreed upon property for that, and a sysfs value to show it to the user ?

We've done this for multi range DACs in the past, and the same binding should work.

So far it's been a vendor specific binding though.
We could generalize that but I'm not overly keen on it because there might be an expectation that it will port to drivers that don't enable it... If there is general feeling this is sensible I might change my mind tough.

I'd moan at your board
designer about putting a protective diode or resistor network in there to deal with an out of range value from unaware software.

Jonathan

Quoted 5 lines

Best regards

Philippe