From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Philippe De Muyter <phdm@macq.eu>
Cc: <linux-iio@vger.kernel.org>
Subject: Re: iio dac drivers : imposing upper limit on value.
Date: Fri, 3 Feb 2023 16:01:30 +0000 [thread overview]
Message-ID: <20230203160130.00002ea6@Huawei.com> (raw)
In-Reply-To: <20230203141211.GA28086@frolo.macqel>
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
>
prev parent reply other threads:[~2023-02-03 16:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 14:12 iio dac drivers : imposing upper limit on value Philippe De Muyter
2023-02-03 16:01 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230203160130.00002ea6@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=linux-iio@vger.kernel.org \
--cc=phdm@macq.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.