All of lore.kernel.org
 help / color / mirror / Atom feed
* iio dac drivers : imposing upper limit on value.
@ 2023-02-03 14:12 Philippe De Muyter
  2023-02-03 16:01 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe De Muyter @ 2023-02-03 14:12 UTC (permalink / raw)
  To: linux-iio

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

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: iio dac drivers : imposing upper limit on value.
  2023-02-03 14:12 iio dac drivers : imposing upper limit on value Philippe De Muyter
@ 2023-02-03 16:01 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2023-02-03 16:01 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: linux-iio

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-03 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 14:12 iio dac drivers : imposing upper limit on value Philippe De Muyter
2023-02-03 16:01 ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.