mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ariana Lazar <ariana.lazar@microchip.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	Ariana Lazar <ariana.lazar@microchip.com>,
	Jonathan Cameron <jic23@kernel.org>, <sashiko-bot@kernel.org>,
	<stable@vger.kernel.org>
Subject: [PATCH v7 05/11] iio: dac: mcp47feb02: Increase EEPROM Programming Write Cycle Time
Date: Fri, 18 Sep 2026 12:06:31 +0300	[thread overview]
Message-ID: <20260918-mcp47feb02_refactor-v7-5-82ca794eafe2@microchip.com> (raw)
In-Reply-To: <20260918-mcp47feb02_refactor-v7-0-82ca794eafe2@microchip.com>

Increase the EEPROM write polling timeout to prevent -ETIMEDOUT errors and
incomplete nonvolatile write cycle, according to the time specified in the
datasheets (11-16 ms).

Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02")
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/all/20260819125300.6B9211F000E9@smtp.kernel.org/
Cc: stable@vger.kernel.org
Signed-off-by: Ariana Lazar <ariana.lazar@microchip.com>
---
 drivers/iio/dac/mcp47feb02.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/mcp47feb02.c b/drivers/iio/dac/mcp47feb02.c
index 2bd2e1bd93db01f79122aaeda2ba4ff14320b404..9d4ba95da84ace639aaefe87262b7125def2a48e 100644
--- a/drivers/iio/dac/mcp47feb02.c
+++ b/drivers/iio/dac/mcp47feb02.c
@@ -447,7 +447,7 @@ static int mcp47feb02_write_to_eeprom(struct mcp47feb02_data *data, unsigned int
 	ret = regmap_read_poll_timeout(data->regmap, MCP47FEB02_GAIN_CTRL_STATUS_REG_ADDR,
 				       eewa_val,
 				       !(eewa_val & MCP47FEB02_GAIN_BIT_STATUS_EEWA_MASK),
-				       USEC_PER_MSEC, USEC_PER_MSEC * 5);
+				       1 * USEC_PER_MSEC, 150 * USEC_PER_MSEC);
 	if (ret)
 		return ret;
 
@@ -507,7 +507,7 @@ static ssize_t store_eeprom_store(struct device *dev, struct device_attribute *a
 
 	ret = regmap_read_poll_timeout(data->regmap, MCP47FEB02_GAIN_CTRL_STATUS_REG_ADDR, eewa_val,
 				       !(eewa_val & MCP47FEB02_GAIN_BIT_STATUS_EEWA_MASK),
-				       USEC_PER_MSEC, USEC_PER_MSEC * 5);
+				       1 * USEC_PER_MSEC, 150 * USEC_PER_MSEC);
 	if (ret)
 		return ret;
 

-- 
2.43.0


  parent reply	other threads:[~2026-09-18  9:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18  9:06 [PATCH v7 00/11] Refactor Microchip MCP47FEB02 I2C driver in separate modules to add support for MCP48FEB02 SPI driver Ariana Lazar
2026-09-18  9:06 ` [PATCH v7 01/11] iio: dac: mcp47feb02: initialize dac_data field in channel data struct at probe Ariana Lazar
2026-09-18  9:48   ` Andy Shevchenko
2026-09-18  9:06 ` [PATCH v7 02/11] iio: dac: mcp47feb02: Fix gain field initialization for active channels Ariana Lazar
2026-09-18  9:48   ` Andy Shevchenko
2026-09-18  9:06 ` [PATCH v7 03/11] iio: dac: mcp47feb02: use field_get() instead of custom dynamic macros Ariana Lazar
2026-09-18  9:46   ` Andy Shevchenko
2026-09-18  9:06 ` [PATCH v7 04/11] iio: dac: mcp47feb02: Return len when disabling EEPROM store Ariana Lazar
2026-09-18  9:49   ` Andy Shevchenko
2026-09-18  9:06 ` Ariana Lazar [this message]
2026-09-18  9:49   ` [PATCH v7 05/11] iio: dac: mcp47feb02: Increase EEPROM Programming Write Cycle Time Andy Shevchenko
2026-09-18  9:06 ` [PATCH v7 06/11] iio: dac: mcp47feb02: Avoid unjustified probe error on missing label Ariana Lazar
2026-09-18  9:50   ` Andy Shevchenko
2026-09-18  9:06 ` [PATCH v7 07/11] iio: dac: mcp47feb02: correct typo from a comment Ariana Lazar
2026-09-18  9:51   ` Andy Shevchenko
2026-09-18  9:06 ` [PATCH v7 08/11] iio: dac: mcp47feb02: use field_prep() instead of custom dynamic macros Ariana Lazar
2026-09-18  9:06 ` [PATCH v7 09/11] iio: dac: mcp47feb02: refactor MCP47FEB02 I2C driver into two modules Ariana Lazar
2026-09-18  9:06 ` [PATCH v7 10/11] dt-bindings: iio: dac: add support for MCP48FEB02 SPI Ariana Lazar
2026-09-18  9:06 ` [PATCH v7 11/11] iio: dac: add support for Microchip MCP48FEB02 Ariana Lazar
2026-09-18  9:52 ` [PATCH v7 00/11] Refactor Microchip MCP47FEB02 I2C driver in separate modules to add support for MCP48FEB02 SPI driver Andy Shevchenko

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=20260918-mcp47feb02_refactor-v7-5-82ca794eafe2@microchip.com \
    --to=ariana.lazar@microchip.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --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 \
    --cc=sashiko-bot@kernel.org \
    --cc=stable@vger.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

all inboxes | Powered by JetHome®