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=1795910103; b=jVOSU3sNcm0Bi43GWqYpPU2bfrioGfhO/PE07CAVlGzMl+PX7D0oRD3j8pF5OJ05poef 8WtD194XeowQqb3yNToeVvJqMaQJ++iX2kc0e8o020Rd0Dcqj2v7duvshFTChlRlcZIFF b5yoP7qHsNrn5Tu2mCUO/boGU5koXl0lAfW6l3ehsa8DbMuLENJMqI5ySPNRy/qFZe03D M5ZA1uOVAun94EeMHxm+dk2sI7xWPMzi0sqtoFondvHmffhk3OtpxMQ7w9jjDgoCE3K98 EBav0+/Ow/PCRxgZkMgHFIsgGSA9+uwA0no1I2hi/P1ku6BSM9XV484mD7dehJy89ng== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795910103; 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=FzCqouMy5QQDG2avvqMUawOrf+YLsjU5AHdQH4zr6kE=; b=yBhHr6NfMtUtU5J331pNoU/qOoey3pzYYuqJN0U41Qzn8tqtgU+SzxtsrCMa2ouLZUmc DGqAE/jaI4n6MkAZ86iTRnn5xQ5pO6T/YPAuMmWDX0muUQCDJz7YTcbv3BFEUtOLyZ2au o4v0fXScz+vMPg214Z1e+u3q6jjefWkXBkuJymEPb23V4gTikRPE15XFVHDi40IWn0mZq 9aqDOZ1Z8HT/xrJaVMSao/8TqEr+oZXh3mtjZdxzKhtop9oIlwxnt3WkpgdZ16KoUgPGV TSXIkaLpr335aUidAIuEnSCFKFKuhjvFSn5KMB7zA2qv7qvI3hBbJ7Y1EMgf+BzLr0w== 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=VRwRDgVH; 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 71FA3606A31C; Sat, 28 Nov 2026 23:55:03 +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=VRwRDgVH Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75BA91F00893; Sat, 28 Nov 2026 23:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795910103; bh=FzCqouMy5QQDG2avvqMUawOrf+YLsjU5AHdQH4zr6kE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=VRwRDgVHuPWx49bx8zp+JwBRzmRngulUqin8ShZ6h5HWfbQijfWwv2ozEz068Yo1y 75DrD77wY4BOlmN4KMRhrsEuugEwRW89Gr9EwOZuxYytTFjI1LHoNuRxQ+HlOTtTpz rb8KFfbFyubIR2nki7WMJNKpYX2Z49nqeoukx3j3TpnLn/evDuRK7mOglZXBzfGuow 1ohWxYkxfv2TJpt7nDeY5qXUba+iI+EZJ7iTAmtTwLJeOGlVfFFByw6Lumd/05/vNA NvleKc7q5Lhu63lPqq6fn3maqGIScQ8/RKqbBUxIjEcDE1Gbw0ZvbznKw+DCUZClbH +cAh2U8GXBxWw== Date: Sat, 28 Nov 2026 23:54:57 +0000 From: Jonathan Cameron To: Nuno =?UTF-8?B?U8Oh?= Cc: "Tsao, Bruce" , Andy Shevchenko , "linux-iio@vger.kernel.org" , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/2] iio: dac: add support for AD5413 Message-ID: <20261128235457.525425a5@jic23-hlaptop> In-Reply-To: References: <20261017-ad5413-upstream-v1-0-61f40c8fef25@analog.com> 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=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 24 Nov 2026 14:07:15 +0000 Nuno S=C3=A1 wrote: > On Thu, Nov 19, 2026 at 07:46:04AM +0000, Tsao, Bruce wrote: > > On Tue, Nov 03, 2026 at 10:06:08AM +0000, Tsao, Bruce wrote: =20 > > > David -- since you have the background here: ad5758 currently carries > > > CRC as a TODO and disables it at probe, whereas the AD5413 implements > > > per-frame CRC. For the merged driver, would you prefer (a) keeping the > > > AD5758 CRC-off via the flag (no behaviour change), or (b) also > > > enabling CRC on the AD5758 to finish that TODO? > > > > > > I'll get started on the no-functional-change refactor in the meantime= . =20 > >=20 > > Hi Jonathan, David, Nuno, > >=20 > > A short status update on the v2 rework, plus a gentle ping on the open > > questions. > >=20 > > Status: > >=20 > > - ad5758 is now chip_info based: the per-device constants (name, > > resolution, full scale and the DC-DC/CRC/reset traits) sit in a > > chip_info selected via the OF/SPI match data. No functional change > > for the AD5758; I checked this by comparing the generated object code > > before and after. > >=20 > > - The AD5413 is added on top as a second chip_info: compatible and SPI > > ID, 14-bit data alignment, an optional reset controller (falling back > > to the existing soft reset) and the avdd/dvdd/avss supplies. These > > are all per variant, so the AD5758 behaves as before. > >=20 > > The main open points are the CRC framing and the output mode, which > > is where I would like your input. > >=20 > > David, I would appreciate your view on the CRC question quoted above. > >=20 > > One more point, for David and Nuno: register access still goes > > through ad5758's own SPI helpers, which is also where the AD5413 CRC > > would go. Should this series move it to regmap, e.g. with a custom > > regmap_bus as in ltc2688, or keep the existing helpers? =20 >=20 > If the helpers can be reused without much trouble, I'm not seeing a big > reason on changing to regmap. I do typically prefer custom regmap buses > but now you need to convert the whole thing so really to you. >=20 > As for the CRC, don't just wait for replies. Sometimes things are missed > :). I would just not change behavior for the existing devices. >=20 > >=20 > > Jonathan, on the output mode (your adi,ch-func pointer on the v1 > > binding): in the ad5758 binding, adi,dc-dc-mode selects voltage or > > current output and with it which of adi,range-microvolt/-microamp > > applies. The AD5413 has no DC-DC converter and only one range per mode > > (+/-10.5 V or 0-24 mA), so only the mode needs describing. Two options > > for the merged binding: > >=20 > > 1) Reuse adi,range-microvolt / adi,range-microamp: an AD5413 node > > carries exactly one of them, and that selects the mode. No new > > property. > >=20 > > 2) A top-level adi,ch-func (1 =3D voltage output, 2 =3D current outpu= t), > > as adi,ad74115.yaml does for its single channel, with the same > > values ad5710r and max22007 use per channel. I think option 1 is a bit too obscure even though it does convey the right info. So I'd do 2 but make sure to highlight it in the dt-binding patch and we'll see what those folk think of it. > >=20 > > Which would you prefer? Or, if you think now is the time for the > > generic DAC binding you mentioned, I am happy to go that way instead. > >=20 > > Jonathan, could you also confirm that you are fine with adding the > > AD5413 to the ad5758 driver and binding, rather than as a new driver? > > =20 >=20 > Again, my reply now might put this again on Jonathan radar but I would > say to wait a few more days, take a path and send v2. Worse case > scenario, Jonathan has other preferences and you need v3 :) I'm fine with adding it and indeed Nuno's mail meant I noticed this had an outstanding question! Thanks, Jonathan >=20 > - Nuno S=C3=A1 >=20 > > Thanks, > > Bruce =20