From: Jonathan Cameron <jic23@kernel.org>
To: <Ariana.Lazar@microchip.com>
Cc: <dlechner@baylibre.com>, <nuno.sa@analog.com>,
<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<robh@kernel.org>, <linux-kernel@vger.kernel.org>,
<andy@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>
Subject: Re: [PATCH 2/2] iio: dac: add support for Microchip MCP48FEB02
Date: Fri, 24 Apr 2026 17:48:27 +0100 [thread overview]
Message-ID: <20260424174827.363f8b00@jic23-huawei> (raw)
In-Reply-To: <3ecc683135c742e097ec6ba91f275cbf5d8202ce.camel@microchip.com>
On Fri, 24 Apr 2026 13:30:59 +0000
<Ariana.Lazar@microchip.com> wrote:
> Hi Jonathan,
>
> >
> > The statement above about it not being possible to use the internal
> > band gap
> > if a vref is wired leaves me with more questions about this.
> >
> > I'm a bit concerned about cases like:
> >
> > Vref is wired and eeprom is set for internal reference. Should we
> > be very careful to not enable vref until that situation is resolved?
> > It might be on anyway but we can at least make sure we are reponsible
> > for turning it on.
> >
> > Maybe the chip has sufficient protective elements to cope with that
> > though obviously it won't give sensible output whilst this is true.
> >
> > If all those are fine, dev_info() makes sense to me.
> > I wonder if we should return -EBUSY for attempts to read the voltage
> > back whilst in this state as well? Might provide some additional
> > indication something is mismatched and we don't expect the device to
> > work
> > correctly.
> >
>
> There are 2 possible ways to handle this:
>
> - Keep the current approach, since restoring a mismatching
> configuration at power-up should not damage the device.
If it were just the device I'd agree, but the provision of vref
is an external thing. Say some other OS was loaded in between
and didn't enable that regulator, + chose to use the internal
vref (maybe with resistor to pull up or down on that pin if no one
is driving it).
> - As you suggested, only read the external regulator voltage at probe
> to compute the related scale and enable the regulator when user space
> first selects that scale.
To me this seems slightly better. Though if the device is actually fine
(if non functioning correctly) with internal band gap on and vref at
max voltage then doesn't matter.
>
> In both cases, if you agree, I can return -EBUSY for RAW access until
> the correct scale is written from user space.
I think that probably makes sense if we are in a state that we
believe won't read a value that is correct.
>
> I will also improve the current messages in order to ensure the user
> sets the correct configuration before attempting to read voltage.
>
> Best regards,
> Ariana
>
>
>
>
>
>
>
next prev parent reply other threads:[~2026-04-24 16:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 12:48 [PATCH 0/2] Add support for Microchip MCP48FxBy1/2/4/8 DAC with an SPI Interface Ariana Lazar
2026-02-12 12:48 ` [PATCH 1/2] dt-bindings: iio: dac: add support for Microchip MCP48FEB02 Ariana Lazar
2026-02-12 17:31 ` Rob Herring (Arm)
2026-02-12 18:00 ` Conor Dooley
2026-02-12 20:04 ` Andy Shevchenko
2026-02-16 13:31 ` Ariana.Lazar
2026-02-16 15:37 ` David Lechner
2026-02-16 17:34 ` Conor Dooley
2026-02-16 18:38 ` David Lechner
2026-02-12 12:48 ` [PATCH 2/2] " Ariana Lazar
2026-02-12 14:42 ` Andy Shevchenko
2026-02-16 14:29 ` Ariana.Lazar
2026-02-17 7:54 ` Andy Shevchenko
2026-02-17 11:38 ` Ariana.Lazar
2026-02-17 12:12 ` Andy Shevchenko
2026-02-15 17:58 ` Jonathan Cameron
2026-04-24 8:01 ` Ariana.Lazar
2026-04-24 10:19 ` Jonathan Cameron
2026-04-24 13:30 ` Ariana.Lazar
2026-04-24 16:48 ` Jonathan Cameron [this message]
2026-02-12 13:39 ` [PATCH 0/2] Add support for Microchip MCP48FxBy1/2/4/8 DAC with an SPI Interface Andy Shevchenko
2026-02-12 17:58 ` Conor Dooley
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=20260424174827.363f8b00@jic23-huawei \
--to=jic23@kernel.org \
--cc=Ariana.Lazar@microchip.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox