From nobody Tue Feb 10 16:18:47 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B29A9392C2D for ; Tue, 3 Feb 2026 09:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770111281; cv=none; b=k2tYzCS6iku0GKyCwzofhlCxPhCgSzByOuSNyqmVZeZpQA/ygWVYgIX0piWt5o3+up+ElMtmNhL9jPCwO8YceK18Egxho5Ks5jpareFI2rgO9uuXk8wx6J6qVyf/gPlo2nmlBRXLOtK0QwckpmDAQvRanBwpb9mxCM0SwmuyEc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770111281; c=relaxed/simple; bh=O0EokgG+ZELOqsvWkD9XXW+m+o8FIHCBWzBKqvIvr1o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jeMvsZLBB34FNIotZ3CbDvQ7V3K/v4u+QQFAVw4jvP0UB5kUBVaV6XmmDcQBgl9QDctshBD0vDA/cY/LHuCeNXXVV49+kFG+bI9YJD3RB5qLdfW8BY7l3Srn3UePoWHtEm82fGZSz/eSYo7AKZnMr5BLAqXnvNMq96VsjLVuewY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vnCnr-0003lZ-Q9; Tue, 03 Feb 2026 10:34:35 +0100 Received: from dude04.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::ac] helo=dude04) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnCnr-003slP-2l; Tue, 03 Feb 2026 10:34:35 +0100 Received: from ore by dude04 with local (Exim 4.98.2) (envelope-from ) id 1vnCnr-0000000Ah97-0SP0; Tue, 03 Feb 2026 10:34:35 +0100 From: Oleksij Rempel To: Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Oleksij Rempel , Andy Shevchenko , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Andy Shevchenko , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , David Jander Subject: [PATCH v4 03/13] iio: dac: ds4424: ratelimit read errors and use device context Date: Tue, 3 Feb 2026 10:34:23 +0100 Message-ID: <20260203093434.2548978-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260203093434.2548978-1-o.rempel@pengutronix.de> References: <20260203093434.2548978-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Replace pr_err() with dev_err_ratelimited() in the RAW read path to avoid log spam on repeated I2C failures and to include the device context. Use %pe to print errno names for faster debugging. Use the parent device context to identify the physical hardware causing the error. Signed-off-by: Oleksij Rempel Reviewed-by: Andy Shevchenko --- changes v4: - no changes changes v3: - Use indio_dev->dev.parent to reference the physical device. - Remove redundant space in error message: "channel %d: %pe". - This patch now precedes regmap refactoring. changes v2: - Update error message - Rebase against regmap refactoring --- drivers/iio/dac/ds4424.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c index 596ff5999271..36286e4923af 100644 --- a/drivers/iio/dac/ds4424.c +++ b/drivers/iio/dac/ds4424.c @@ -100,8 +100,9 @@ static int ds4424_read_raw(struct iio_dev *indio_dev, case IIO_CHAN_INFO_RAW: ret =3D ds4424_get_value(indio_dev, ®val, chan->channel); if (ret < 0) { - pr_err("%s : ds4424_get_value returned %d\n", - __func__, ret); + dev_err_ratelimited(indio_dev->dev.parent, + "Failed to read channel %d: %pe\n", + chan->channel, ERR_PTR(ret)); return ret; } =20 --=20 2.47.3