From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795898300; b=lnAb6mo8LTrF6UQvMj4sMGFJp6wkgWpNO45qXv2wyovjndHpSt4jOzGV4FLll8oH+kYM xWfh0jybeVvL4FYc1BIzbUl72zGsVqBgS+QbxigWXHiN5nqwnXxkOXlV0jpg9q9f/V4W6 EMCHwJbrftY9RtPLWCR2Pp0e/hXrUeaB21Q6pFB44CMIUEe9ClD47b2SlUNZGyVIbSKA3 YBZlhyIvGVW0lojvp7YH5UXxuSA++whZlCpeMO75x5tmuCnXikxx1CcheA4HOQ/QwwFTi Eg7ExQtZ6D14qCkhDW0nJvspkDDlL1kLcVve++CEsMNZVxgVT9dfI9zyOg2MjqvBcVA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795898300; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=e6Rl/mqqcOWxhQ9um6Zau1kbh0j2VT6sPE0+rgQtrU0=; b=IDurs7f6kvJyJ+JhzR9TXtfv1egBJ/59RtRYPy4FDnuwu1KY4LukVml2DVsYqdVd955Q iah41ggiJJgS7cWwv7ZR9pmP1svuh7iUet3WxGOz5V9YbyNY+tiXaviwNhS2CdcFCIvV1 1/AM5NKy9FP5yXt0Bs20b0s9T+JiJUPlU2a2NHlTJkhmZQsB+djKqSPuOSpFWXb9dadCG Eti8f1iLT9K7jnHZlMhy7W0vBNxh462Hhpipkoywb7nu96DyPfbTvM2OyBB1gKgZwLh6V 0x8kNezBRK9yvbcKP1Nx0XWqmg/lcBhn/5fqREVu83T93eXuMecdi1ACYB0odG42xfA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Y781AE9F; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26A48606A31C; Sat, 28 Nov 2026 20:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Y781AE9F Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99B631F000C1; Sat, 28 Nov 2026 20:38:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795898299; bh=e6Rl/mqqcOWxhQ9um6Zau1kbh0j2VT6sPE0+rgQtrU0=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Y781AE9Ft0u9/DjeYjYShuy/5NIkZznGr5oFeEdrH8G1O02hVlmp/N1KR09NGZQBb XdNLTXR3xDmlLMWhd5FjauBpC7NaDLclZTc9MjiVRm1il7huV1vugyZ9sHxX+YYQzj YE2HMjbCtjjiSWhdderploCjRFd47vlAhAb14OPgZSgTSyF34lZJ744HjolOzngKM3 SaqmMVrjkppCBhNMcVmDzr2+2xN0nUNvcm+hptm5eMB1eyCp5rN+nK67zChBbvYEfp 9RL0y3/a/XaYVPVN8ou1HtCf/rqNlJWMHRKwiDx5HTCG7E4MkHjgzAYUM6GrF9ThNT gIfR8YI+eIODA== Date: Sat, 28 Nov 2026 20:38:11 +0000 From: Jonathan Cameron To: Neil Armstrong Cc: David Lechner , Nuno =?UTF-8?B?U8Oh?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux@analog.com Subject: Re: [PATCH v7 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator Message-ID: <20261128203811.3f4a626f@jic23-hlaptop> In-Reply-To: <20261123-topic-sm8x50-iio-max34417-adc-v7-3-d8f87edc5086@linaro.org> References: <20261123-topic-sm8x50-iio-max34417-adc-v7-0-d8f87edc5086@linaro.org> <20261123-topic-sm8x50-iio-max34417-adc-v7-3-d8f87edc5086@linaro.org> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 23 Nov 2026 18:47:46 +0100 Neil Armstrong wrote: > The MAX34417 is a specialized current and voltage monitor used to > determine power consumption of portable systems. The driver support > getting the channels voltage, average power, accumulated average > power and energy over an I2C/SMBUS serial interface. > > The MAX34417 datasheet only specified on how to calculate the > accumulated average power, but with the Sample Per Second rate > we can easily get accumulated Energy in Joules. > > By default the IIO driver only supports single-shot Voltage > and Power sensing, but the accumulation can be enabled by > enabling the Energy IIO channel which then enables the > Continuous Accumulation Mode. > > The counter is common to all channels, so when reading a single > channel we will copy all accumulators to registers, so in order > to permit reading individual channels we must accumulate the > other channels in the driver when Continuous Accumulation Mode > is enabled. > > Signed-off-by: Neil Armstrong Hi Neil, A few things from sashiko. They seem on the subtle side so I didn't spend the time to figure out if they are right or not. Please take a look and if false positives just reply to say so: https://sashiko.dev/#/patchset/20261123-topic-sm8x50-iio-max34417-adc-v7-0-d8f87edc5086%40linaro.org This is a rare case where I think the ABI is complex enough I'd like to see some documentation. Add a driver specific file in Documentation/iio/ Talk in particular about which interfaces work only in cam mode and which work only when not in cam mode. Ideally keep it fairly short though so not too much to review! Otherwise no additional comments from me. This is looking nice. Thanks, Jonathan