Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp380575rwl; Wed, 5 Apr 2023 01:57:07 -0700 (PDT) X-Google-Smtp-Source: AKy350ZSfm7QC/TUJjIRUIqirrrAEr36nrTLdC6kHlbihzdaQJU/8Dwp3KXxAmByEt3pvt4IoLCB X-Received: by 2002:a17:902:c7d5:b0:1a1:d24f:a5f6 with SMTP id r21-20020a170902c7d500b001a1d24fa5f6mr5091961pla.46.1680685027667; Wed, 05 Apr 2023 01:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680685027; cv=none; d=google.com; s=arc-20160816; b=xTQ/8sGc9FqfVNPVQwXhWiokHBfveVpdAofFoYaTxrm4Y7pztYhJJd7z1YYRIq6J4k 1oQTPqE5foCROUrKv5GWa6V2VwuJsZ5qiswimPGYrUU0NtZzaGL349ouLP3z7CXucIjm MZEC/YAAF68dIQgIlILclI//VMoEUOHdo4SQwak989qNnrUfrETLHWeDr5cGDk0sY31l yKq6LedA65IDEVQWy5xDFBx8UqzwUuYFTSeWvZrc6W7hZxyCXjpRiqtJAIESjv6JamDy rJ6rppxl5elwmgAhRRfBIYA2qxTwJfIGPDcL1Fa5FkT+hS10QidjdUZTVn+htt7icY8p SeVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fW2dau+FHfzLt+btkrmcj2LldXdACOItHTB+/VCJMi4=; b=eweiQZpdaMZJXPl88ItvUmA+6wWor+LjR10hxX0Sh4BOXaD1aBZM5X90f9vPx9uddL /9Fs/Y9+Jj5g4k/80jKmrgFxTWAm/2F9c+537t8SVenSMOJnf6A+HESKqFiNby+71aYo vxMRv1Ck0tiIdoxzlGjh8Ibz7YcP62E4oQlsnbfIzBC1CU48jEY1s7w0Rk1eP8CByFGN wzCad7hVJ1mAwW1uQEUc7X7CzETWOlvQpHevPnBtNgFbkn14ErwqRnkJUaWmV6tZz9jY grB/NFyFmY3zMOInWI7HQfg+Pu3ocJJVBwk9i59N59e0USQTeLQvkG6yC59ZbxNnXJo0 Y2OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fbr3EXKO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a38-20020a631a26000000b005096eb1dabbsi11252826pga.716.2023.04.05.01.56.55; Wed, 05 Apr 2023 01:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fbr3EXKO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237078AbjDEIyV (ORCPT + 99 others); Wed, 5 Apr 2023 04:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236840AbjDEIyU (ORCPT ); Wed, 5 Apr 2023 04:54:20 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33E81F3; Wed, 5 Apr 2023 01:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680684859; x=1712220859; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=V+zTDzqniCNLAugrQ5YEmCW1Vqzv6gfhvHx8dIPWqRw=; b=fbr3EXKOj6Mb75mmsTXTMZLfjnSTZEHQQi35NsT4vv0JUk9ZOOp83XWj 5QGjalk5CBqnuj83TOUIQE+F9sMM8M34zzCM6kGF/wFS/vm41IsVUDiqf syVT6xTUmAVOuoMufABa2lINPKl937O102q1XJQFKldaahqkGkHqckfd6 5Xr5PYKNMqYyHHADcPna7MB+CHI4y6GcoxsFi8IKDHqdn1HxJ2G7lBuyu FKUyUbz8plUUXE3IOTNWmV97eY5IwKh/4z+vK0+loUNhzc8dROuyQUDZM fbyXxhvdn9qOD0StokUnj6h5IIAGFAdD1FVGpfGWyhkdKrJ1ADv8VgLD2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="344980579" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="344980579" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 01:54:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="860898214" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="860898214" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 05 Apr 2023 01:54:17 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pjyuF-00Cl4B-28; Wed, 05 Apr 2023 11:54:15 +0300 Date: Wed, 5 Apr 2023 11:54:15 +0300 From: Andy Shevchenko To: William Breathitt Gray Cc: Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 5/5] iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 04, 2023 at 10:12:02AM -0400, William Breathitt Gray wrote: > ADC sample captures take a certain amount of time to complete after > initiated; this conversion time range can be anywhere from 5 uSec to > 53.68 Seconds depending on the configuration of the Analog Input Frame > Timer register. When the conversion is in progress, the ADC Status > register CNV bit is high. Utilize regmap_read_poll_timeout() to poll > until the ADC conversion is completed (or timeout if more than 53.68 > Seconds passes). ... > /* trigger ADC sample capture by writing to the 8-bit Perhaps fix the style here while at it? /* * Trigger ADC sample capture by writing to the 8-bit > * Software Strobe Register and wait for completion > + * Range is 5 uSec to 53.68 Seconds in steps of 25 nanoseconds. seconds (in SI the small letter is for the unit(s) of seconds). Same for the commit message. > + * The actual Analog Input Frame Timer time interval is calculated as: > + * ai_time_frame_ns = ( AIFT + 1 ) * ( 25 nSec ). nSec --> nanosecond > + * Where 0 <= AIFT <= 2147483648. > */ -- With Best Regards, Andy Shevchenko