Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1871844rdb; Sun, 4 Feb 2024 05:09:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IH69TSJVxg6HpQNAXVX89FaT9SoflgvBWd7TgjrvigUyNSrl7/2JKobG55xq+2jST7gogc1 X-Received: by 2002:a05:6a20:c78c:b0:19e:4ed7:127a with SMTP id hk12-20020a056a20c78c00b0019e4ed7127amr8744462pzb.46.1707052158945; Sun, 04 Feb 2024 05:09:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707052158; cv=pass; d=google.com; s=arc-20160816; b=IoCSSw6GvfA5AY+u9rJ8lk6IariI1l5Sit2fp6Heyeivdx/KOSLZZnaWsIwGRwi790 8T1OkxCoS6WT2dwtwYV3P7CWsVF3Eu4Tzl7/tm4KBjoHL0UHHdGMhkFodY4jjnRN3skw BKHJ3x0KyfAfNKbW8T/hqhYgnUA1VSD2fKzKyuHbYa8ztiNad8Z4NZ+XtVanxb7KJIKx idtGIZpEFqguPSt3Up1qyxeAZpZ0kFVefbaFr/6c6RVGyFf4zkDed8PQ6hiciGIv/5oY 8YQZzJHLVyVMD0q73ZMwdT97dxFBnxjbt/yZAriK3UOQsmarMm0CDpLfI5hTzV/LL3NF IfdQ== 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=IHC45ZHZDr3nQAfZXPZbz0pIO8VJDBsfElj//0+o+dI=; fh=f9Ku9AzzizkwWXCxjJTSFNFhAVxX/+ZWXNFq6aCXu90=; b=zItzdi4RHwbd1kNpZYYpRRY/AQhfDhg6oQRY07TQP6qCkQEGxTuB296OAc/4ncWH+M Y4fhv6ymkJvNN6qcooefsnAAMFYth21XDwGmKdY6uACdQZcQJ8c0KBZbrhXo/tZCGf4L C+JBXbiSnlW40Sfan+wy2W/6YRP1mw5y2rlSsSB6Dy+TTV/AS80IE+FjcKOLCmVJIlZd ucXs+saJxiadmBamaRMA2HH06XhGTD8hv6nJEn+merkbRFpaIeI346vMon+iLgKn/Hrv n6LYO+Bgy/1eZ1JdhARXWMKUyk+NX2p/rRg19mKt3Uwg2w8nr8bBxUCUuQqLSIIaz6fL NNzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sQJMaGRR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51654-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51654-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWnRB5c2HbslBJ9YMFOp2h+vNjPsYhJ1vfMCCXwYfQG3cxm6JaVry5a1ZasB9ZWVUm3gQGwgKlAuzWzaVKgA7MTE1a4sNazEYW3h+Mylg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id fb16-20020a056a002d9000b006e025a67487si2869749pfb.254.2024.02.04.05.09.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 05:09:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51654-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sQJMaGRR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51654-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51654-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D8FAEB22B50 for ; Sun, 4 Feb 2024 13:05:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 494FB224FA; Sun, 4 Feb 2024 13:04:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sQJMaGRR" 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 5E07D24B23; Sun, 4 Feb 2024 13:04:33 +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=1707051873; cv=none; b=ZJDIHh6j4HLZIk/OKOwcUEzxEq9L+0ts59u0xudMHBTxXBixSNLJ0t/zuKRC01cocyXiG7AL2/+qtkBn6jNODtn8pkbV2Xx0QEvhBdFJm3nNw3Cj73femOMY/LBLz0UNICGT5fJxeXuTV9RsNudrjDyJ1tieJqs2Uv1fj6V97Ak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707051873; c=relaxed/simple; bh=rEOfohGClmor7V7cbTke00vd5PxmsX4kEU8atdcgq7w=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HpoXtYBYwbc1i+Qz3Uzixdk1HZIsnopR5X5dSvZ2kfT9uKxNj6QgXvvlx/dE2jkO9glOq4xDe2Lw4ANC3ho1V9ijX7jJy6aC+5BUGBzHeIX0zjcsBwtAzt8KnmymFFEbf1ShchE3n88PrsatPjaEAcLqpxbQEvLkVjH5zujcKws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sQJMaGRR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDC48C433F1; Sun, 4 Feb 2024 13:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707051872; bh=rEOfohGClmor7V7cbTke00vd5PxmsX4kEU8atdcgq7w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sQJMaGRRQ7HAJ0g5HBB+orrjZKpP0RYm1LYi19aeE7Hs7JQwujmVSGPJZyrjJ2ado uE49A2aG1/1AXn6E1EEW/bFDQ+IBAsvn65z9GK1MM1oD7fDoQ8Sv1YbPNxnCp3GRhc O8FpLUIbi0ePcF32oEFEqvbSWljyhAguTZGy5dk3hEAxFlbogrAmzxPFawwG40q19n S4k7Tq9ot6xcyvXgWgh9jkonjOFg0vybv9dDv2H/cNs7mwSsqlUWyFprC5z1UBnq5p fS6J4ze5rVyhoc4GSHwt5GKkkq1j5bkcZV1aQkrGz4VD3Cgk+ELel+4lXYdlceKNnX ov8az4jzGyDBg== Date: Sun, 4 Feb 2024 13:04:15 +0000 From: Jonathan Cameron To: Alisa-Dariana Roman Cc: Jonathan Cameron , Alisa-Dariana Roman , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , Alexandru Tachici , Peter Zijlstra , Andy Shevchenko , "Rafael J. Wysocki" Subject: Re: [PATCH v2 4/4] iio: adc: ad7192: Add AD7194 support Message-ID: <20240204130415.56ca3c42@jic23-huawei> In-Reply-To: <8c7839a9-b1f1-4e58-b35e-afdc8503c90f@gmail.com> References: <20231114200533.137995-1-alisa.roman@analog.com> <20231114200533.137995-5-alisa.roman@analog.com> <20231126163426.66e51114@jic23-huawei> <8c7839a9-b1f1-4e58-b35e-afdc8503c90f@gmail.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=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 2 Feb 2024 16:32:14 +0200 Alisa-Dariana Roman wrote: > On 26.11.2023 18:34, Jonathan Cameron wrote: > > On Tue, 14 Nov 2023 22:05:33 +0200 > > Alisa-Dariana Roman wrote: > > > >> Unlike the other AD719Xs, AD7194 has configurable differential > >> channels. The default configuration for these channels can be changed > >> from the devicetree. > >> > >> The default configuration is hardcoded in order to have a stable number > >> of channels. > >> > >> Also modify config AD7192 description for better scaling. > >> > >> Signed-off-by: Alisa-Dariana Roman > > > > Not directly related to this patch (which looks fine to me) > > but any idea why 3db_frequency_available is not using read_avail? > > > > Seems sensible to convert it over given all the other cases are using that > > and it will allow dropping at least some of the attributes infrastructure > > for some devices. > > Thank you very much for the feedback! > > I actually tried then to use read_avail for the 3db frequencies, but it > required a greater rework. If I remember correctly, the four possible > frequency choices need to be stored in the ad7192_state for it to work. > Should I add a patch with these changes? > If will end up a tiny bit more complex than currently because of the need to stash them in an array rather than simply print the strings directly. But not a lot and should allow you to get rid of a small amount of other code. Not urgent, but I think this would be a nice change in the longer term Thanks, Jonathan