Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp509502lqp; Wed, 12 Jun 2024 08:07:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcJnAeE/5UthADcx9jQv0uTNHFxD34Lrz3SXTbMN5T6s/K7BYpNSfupAeh9oZw7wGOkp/QL8dE2fcHtkRZ+jPTp4KAwegKljVUP3JRxg== X-Google-Smtp-Source: AGHT+IHDu0MirKvPZVc3775NZDnZEgBeXxUQC7Cxaqf3fviveeHmgQxU6olJh0NEOZKIFhUk2SP+ X-Received: by 2002:a9d:65d9:0:b0:6f9:ab93:1c53 with SMTP id 46e09a7af769-6fa1bf7d0f7mr2117403a34.13.1718204850674; Wed, 12 Jun 2024 08:07:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718204850; cv=pass; d=google.com; s=arc-20160816; b=awC4vGm5cKy3ESqdSXoVtzfWc0//47tlTHmveoWRvMwd4fS/nGKJH2miMmy0l1srTi 7YjV/JfcYuA8wVmuA/ZZWORj0OUnNShfjPa27YMJw0eMq0/IgAGKB9jqj+P/Uy6lvD9E 3I+VsKSwHaCWVNhUH9E3gK4bsQYsAZ257+IrEXG4A2YPVYdcJJcN9gnDhVgaXGTRDg5k 5yZQIuX14g2ufPm+cdHHj73aZ8osMsDwUkpMF0MVlJFctnJ9e0ADS4vjKPcTUZvKeN5N 5hypEPqMm7g1UDm+mmySDK9LvBoFy4gYxeOOddRCtNeNC8rV0d46eIJWzrWFduyVHUFd NCDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=5gh97F4lmMTKjYGn4RJTGhAQsduqmkqK7gLhFlr0UQM=; fh=u4OiwaxlS9uDrXQ0FnOMiBkHHvAFOlzDVVSNpThkCAQ=; b=ycbGf1k2CfWU75pegHB5DC+bgSR4XLmooPARD5QgR/2fo02Cd4d5Mw3jpUvGzA4AS1 /rprBA1lHgeNJKZj2eZIwwUTWUOo0dDyFdjaC5JLnpfj+5AQkRU60tVQwXXUTdnbSn8P 5QSfHngVZ58EbwkGN7Z9kU/RoRvPrwVV7Z+SsfzPp6r8+jgTRiuGi09o5bZVwBo3Te29 zKQZ+mScaxrXjwRLsKvNmEZFH/mMX6Tk3LFnNC5b2oP4cFmFqx/bFGfT35MAK5H/UZc0 Gvt2cnbI9fs27DR9cgLtUu4uncxpFy+fjIty53PPnUwlKrvUwMVKRr1hO6JXk4ldyHSo F70g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hUA+Xytk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211734-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 46e09a7af769-6f98165e054si3116014a34.189.2024.06.12.08.07.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211734-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hUA+Xytk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211734-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C4540281086 for ; Wed, 12 Jun 2024 15:02:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 07D4A1802CD; Wed, 12 Jun 2024 15:01:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hUA+Xytk" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B9061DDF6; Wed, 12 Jun 2024 15:01:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204495; cv=none; b=e7A9gMgnB8lnMlIPfvSUne6K+BWSfyKc+vQP8qyYrOVu3UeQgN6P04PTAxJyEpEjnZn8ijmFbmJFXo/eqfK87yhlj9BgkqwabgmM7oQ/90Nw5oE+Bx3pQs/QjUUVN/KEYEN2mc41FJmkbrnRNdl9t2z7aipcHVwqB0H2Meu8xsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204495; c=relaxed/simple; bh=5gh97F4lmMTKjYGn4RJTGhAQsduqmkqK7gLhFlr0UQM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=uwSSeJgIqmBiUI8WkpyUHWpgc/tZ5QwbcG40mccNeAYI8Nz/U7vZYYTGS+VZVTu/1RmsIP8/NCS3C2YR+QeEIv2fYZAo3QEaubIUOXhg32AM7WSo87qJApOAb2o3Z4c462KNYwuvJ+JnaSPqkiBZPQBsII0klK75j8916y7ZxxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hUA+Xytk; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-52c82101407so7519914e87.3; Wed, 12 Jun 2024 08:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718204492; x=1718809292; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=5gh97F4lmMTKjYGn4RJTGhAQsduqmkqK7gLhFlr0UQM=; b=hUA+XytkSAfJyiIooCRkAx/OYbIxlLC8zes5HHc//tZ5xYXBs9hVs+k2EaM7U3Gxyf kCz4JZMDJzDLDWXiV+3HAamOQ1JQuRuhkhsxKMx/E3KvzUnLoJhWAbgVcOw4tkppQJPV JZxFiTC94Y22cotNi+WUPGzhJCurZWpbE4AgtmYGbTDcYtRtkNR8ArfNomLG+qFcuhIg z7wZ9v7r8K0YYPlGuNU4vKRR5MBRbNSD1Cp4hUj88szDFQAea5CvbVN/OVgIePaG0wh/ 0fUrzxZxknpy1Um3k91J1P2g3PLCeLqCFSmuLnIS3Egym3cKfBbsKoCTusonHqy7RYil o2BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718204492; x=1718809292; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5gh97F4lmMTKjYGn4RJTGhAQsduqmkqK7gLhFlr0UQM=; b=ud9C3XhRfhw/U0LLC7342InwBS4BkiKqezTqaAxlKLa5PdZsuRZNbsYnVToGaus7pJ 0ZbR6KTjvXtZbU1Z5MKT19tw1hFMlw8OgKSVve3/rb9GShottFCh6PXRDZfoAnOs8BSL JmgfPcyn4xPO/znfL1OnWaqTYZgmQzO7AoDpRzz8VS6l429IEi5DDz3wF85AoPhIeb0v i3zoh2tTgDiF2vUeaAbxfvfY3Hzh5DGMTpC2kNI6Qn7GcCElwPIjyOzKkiZexLToKyws C74Snsmw++VNOkwaN/dWWZ1wKbacMoWqXv9RthLiblS7NUMn4GXaRIjIN+D6tYl8s4sx Xhiw== X-Forwarded-Encrypted: i=1; AJvYcCW13xFAwZPSrQ8rdqHJMtD9RjFRKAtrivkXESCEX+diyfv+d8J/raepeSP8pq47+ha40PlI4vOARE9WVThLjNGr8StwYhR3xEBecSeno94KigMJEGz9l9E2v14vET0JAMuwFQbqgEFSPiADQFfx6NC14HAdjquMnkwTNEGA3oBIqkZgyg== X-Gm-Message-State: AOJu0YwCSGxbLqPbdH9jYm+pehlm4UYZ/6a2K1kyobQ+zVOGNKbSlUSL yB34wQoJ9RtAU0JxmL39tu7xaLdpzMD7u9qS/KyGgEZEPKRrL8XL X-Received: by 2002:a05:6512:281a:b0:52c:9f9d:d55a with SMTP id 2adb3069b0e04-52c9f9dd6acmr163290e87.51.1718204491285; Wed, 12 Jun 2024 08:01:31 -0700 (PDT) Received: from ?IPv6:2003:f6:ef1c:c500:994e:fbde:478:1ce1? (p200300f6ef1cc500994efbde04781ce1.dip0.t-ipconnect.de. [2003:f6:ef1c:c500:994e:fbde:478:1ce1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f0d200820sm570859466b.181.2024.06.12.08.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:01:30 -0700 (PDT) Message-ID: <26b29525e41aad25e144f98994640585c4c8b705.camel@gmail.com> Subject: Re: [PATCH v3 2/2] iio: adc: ad7192: Fix clock config From: Nuno =?ISO-8859-1?Q?S=E1?= To: Alisa-Dariana Roman , Alisa-Dariana Roman , Jonathan Cameron , Michael Hennerich , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexandru Tachici , Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Date: Wed, 12 Jun 2024 17:05:18 +0200 In-Reply-To: <20240612141637.175709-3-alisa.roman@analog.com> References: <20240612141637.175709-1-alisa.roman@analog.com> <20240612141637.175709-3-alisa.roman@analog.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-06-12 at 17:16 +0300, Alisa-Dariana Roman wrote: > There are actually 4 configuration modes of clock source for AD719X > devices. Either a crystal can be attached externally between MCLK1 and > MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2 > pin. The other 2 modes make use of the 4.92MHz internal clock. >=20 > Note that the fix tag is for the commit that moved the driver out of > staging. >=20 > Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging") > Signed-off-by: Alisa-Dariana Roman > --- Hmmm, I did not looked at the datasheet but looked at the older implementat= ion and I'm not sure this is an actual fix. Can you elaborate on that? So on the current implementation I can see that we have some properties tha= t are not documented: adi,int-clock-output-enable adi,clock-xtal So, I see in your series that you're documenting adi,clock-xtal using clk-n= ames. I do think your code is cleaner but I don't think the older implementation = to be buggy. Am I missing something? I can also see that you're ignoring AD7192_CLK_INT_CO... That's also removi= ng functionality from the driver even though the implementation is not as it s= hould be I think. If I understand that mode correctly, it's just about having the internal clock in the MCLK pin. Effectively this would then be a clock prov= ider with a fixed rate of 4.92MHz. So I believe that exposing it as a clock prov= ider would likely be the way to go. - Nuno S=C3=A1=20