On Fri, 3 Feb 2023 15:12:12 +0100 Philippe De Muyter <phdm@xxxxxxx> 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 > > Best regards > > Philippe >