mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Baek Kyu, Kim" <pocj8ur4in@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH] iio: dac: mcp4725: Update the cached DAC value only on success
Date: Sun, 25 Oct 2026 22:31:41 +0000	[thread overview]
Message-ID: <20261025223141.0cd4ac03@jic23-hlaptop> (raw)
In-Reply-To: <at5v4pw34L8Cj0vU@ashevche-desk.local>

On Sun, 25 Oct 2026 23:08:50 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Sun, Oct 25, 2026 at 11:13:51PM +0900, Baek Kyu, Kim wrote:
> > mcp4725_write_raw() updates dac_value even if mcp4725_set_value() rejects
> > the requested value or reports an I2C transfer error. After writing 1000,
> > a rejected write of 4096 returns -EINVAL without an I2C transfer, but
> > out_voltage0_raw reports 4096. A later powerdown exit sends 00 00 instead
> > of the 03 e8 frame for the last successful value. The EEPROM store path
> > uses the same cache.
> > 
> > Return the setter error before updating dac_value. This keeps the last
> > successful software value for readback, powerdown exit and EEPROM writes.  
> 
> Does it need a Fixes tag?

Yes. Given I wanted to reduce outstanding patches, I added it an applied
to the fixes-togreg branch of iio.git

This goes all the way back to 2012 introduction of the driver.

Fixes: cf35ad61aca2 ("iio: add mcp4725 I2C DAC driver")

> 
> > Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com>  
> 


      reply	other threads:[~2026-10-25 22:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 14:13 Baek Kyu, Kim
2026-10-25 21:08 ` Andy Shevchenko
2026-10-25 22:31   ` 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=20261025223141.0cd4ac03@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=pocj8ur4in@gmail.com \
    /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

all inboxes | Powered by JetHome®