Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1170526lqt; Sat, 20 Apr 2024 03:55:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVEAbJjDgjUXd+EOKCAM9MnuIUHwpizvxo8XCE6WWT6KWRfWO/9F1hzn9ZVokJttwWm8aY+CniofE/7E/dywI/o4Z4lUKxEegnN8e2XWA== X-Google-Smtp-Source: AGHT+IGFJZzYoI56fAfCtjnPINVPeFdmZL0lYbVAMv1qagPkttqJVQgJrFgfuF7rfyorD8bAtQS8 X-Received: by 2002:a17:906:1703:b0:a52:8a8a:59cb with SMTP id c3-20020a170906170300b00a528a8a59cbmr2858113eje.61.1713610538755; Sat, 20 Apr 2024 03:55:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713610538; cv=pass; d=google.com; s=arc-20160816; b=bZx3KCtPL2AAjFEAxcrUMmIYGUQFbSRbW/13X4cru75MulNSpNpVDoq/0YWf2Jqgnp u0J8lOiuDy+1uhzbV+OSNUSH4v4H/NSTyMPl1B8aAhY9maJw0Qn1nyUQKGz/o7hKd5jh fKQg3JoHnWaTUnzp6tcR1HZimeA/SV5JmgB4/qp1YS0oKi2+cVkZo/YO3v3Tpd1x5sqX yRa0wGZ1JoVhl4mjZ6pH6gcOPMSSeuFJkzZxd6MpD7TFTCAGATfiMn+WSSBfKpOV5jWJ +cvj8oePZdXtjLQ82FZ5WtMSfO4pnSqR5piOGCZuiGcjjSoEeur6PtsCAxQYtcFMofvT TZZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Ov6dO1tfDL3Jr9BjnMMVjwE7y4CEhg5rBeX3Mhouxiw=; fh=5hplyeh49ovNJRBl6QPxYlZG8xAqg1qkwpM821jyzW8=; b=uaCdH5rpN3H4hyzVwhuDPS0uFnrbCJX73LSVXI3f6capOP5xv7k7hBlVnmOx+KNxDC plhBCy9rHrgqJ/SLL4Bs7qsbDe9j7we9pGW9SZqJVUY/MT8sp8OZdVWRw/L14U6rsm3C QkwskR+oqLT7LUG2KUCmrazAZdJoPVG/mv7hxePE/BFve/gWQu0YPUKzn0a84oXIwfQr GI60pJRERJG3GgqVis5R7breu1URu0aGPwLYk1t6bZhrbk3UtU0RdyckJreTjG9bzR9t 1Yeugm0o6MF1CMH4r4qFjQJSG/6RREsQgJsdex37rjfQbQu3omHGnp+9ZSdU20TAZZ1K rGYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K+xPIczF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-152233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152233-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v1-20020a170906564100b00a5209dd8ad9si3174968ejr.8.2024.04.20.03.55.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 03:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K+xPIczF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-152233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152233-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7B0AF1F21389 for ; Sat, 20 Apr 2024 10:55:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13C1428DCA; Sat, 20 Apr 2024 10:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K+xPIczF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 35E39DDD9; Sat, 20 Apr 2024 10:55:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713610530; cv=none; b=C9h9zP41Dkm4/VniftRRkq+muiAxeuvDkhbdpzTCD2dAJgNsvM6ijnYqxLldjMs+tfYGwUMYdX8uRy/wTyx9UfitybEsczUeNvwFCJjNal4oxw+1DyM8QujyNca1/PtyX8KrbaW28yb09AUyWoTOq3Mt0ZSl8ltpwPSBhelBQuo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713610530; c=relaxed/simple; bh=zTvudgFfH/h0LYFsm8ge6F5OW8AtcgM2CqtKKJJoAFI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PVR3qfynIhuJqSi0AD/21mOari82yYpLan0Kb5c+hpPV6DwUj4Cjc0Hj2aGOr3h/3D6/fS0JaCgDXeDi79DxlKK9y7I0ZnteDyTnN49Xm0iB1wOw/aunS7DE3UluVH9r57kHqMJr11qFsV/iQH+BLsXimcFq3Jl4o3mWi/hmx+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K+xPIczF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88899C072AA; Sat, 20 Apr 2024 10:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713610529; bh=zTvudgFfH/h0LYFsm8ge6F5OW8AtcgM2CqtKKJJoAFI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K+xPIczFcKc0b03zVTfBLWnljX+6W2rVvX4lqpSCUmjQtyhiSx8W/GZ7/sqAq9Vth 8cxUJmGzzX0jLpi9iZXm45JqDTQ+/LgD84zFNZj2wKllv/esuC1O+gc7oa5xkpeD1A j8nfyazAHCWabIAKKCJBJ+VSrhybwPEva7B5sdsTQ5+AEK1m60s4WLvxCgT5Ak/Brj BZqAq8Z7YGLv/YJCe1rXwzb21D1tk8fkGb0c2ljKD/gkRVOARRe0uG9cY2TucckA9A Im5MnlnN1BjXS6PbZ4mD1kFT8meceWp6oE8r/TwNRgb94uXz2yPYKM/krZLWlBHugd n1sU2FSogK41A== Date: Sat, 20 Apr 2024 11:55:15 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Alisa-Dariana Roman , michael.hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alexandru.tachici@analog.com, lars@metafoo.de, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, andy@kernel.org, nuno.sa@analog.com, marcelo.schmitt@analog.com, bigunclemax@gmail.com, dlechner@baylibre.com, okan.sahin@analog.com, fr0st61te@gmail.com, alisa.roman@analog.com, marcus.folkesson@gmail.com, schnelle@linux.ibm.com, liambeguin@gmail.com Subject: Re: [PATCH v6 5/5] iio: adc: ad7192: Add AD7194 support Message-ID: <20240420115457.44f558cf@jic23-huawei> In-Reply-To: References: <20240417170054.140587-1-alisa.roman@analog.com> <20240417170054.140587-6-alisa.roman@analog.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 17 Apr 2024 20:06:00 +0300 Andy Shevchenko wrote: > On Wed, Apr 17, 2024 at 8:01=E2=80=AFPM Alisa-Dariana Roman > wrote: > > > > Unlike the other AD719Xs, AD7194 has configurable differential > > channels. The user can dynamically configure them in the devicetree. > > > > Also modify config AD7192 description for better scaling. =20 >=20 > ... >=20 > > + device_for_each_child_node(dev, child) { =20 >=20 > You can use scoped variant AFAIU that's available in Jonathan's tree. >=20 > > + *ad7194_channels =3D ad7194_chan_diff; > > + ad7194_channels->scan_index =3D index++; > > + ret =3D ad7194_parse_channel(child, ad7194_channels); > > + if (ret) { =20 >=20 > > + fwnode_handle_put(child); =20 >=20 > With the above this wouldn't be needed. >=20 As it's a minor improvement, and I tend not to like unnecessary interdependence of series in my tree (until they are in char-misc and hence no chance of them changing), I'm fine with not using that new functionality here.=20 That will change once it's upstream of course! I will send a pull request to Greg nice and early this cycle so that should be in my upstream soon. I'm also fine with you using this if you want to though! Jonathan > > + return ret; > > + } > > + ad7194_channels++; > > + } =20 >=20