From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (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 E2EAF383C9D for ; Sat, 9 May 2026 20:27:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778358463; cv=none; b=WkQtlP/zNzQc4sy/Bg6iY05peB39lApi58P+UosYOv2+lSuuhlzQ4jkA8Jo0kUEmxcA/uEM3oOcLPRcfwO4r6KxI0clkI01KEt9McvSFGRsrp8f3rkWYDkwF5z9pftw90Bijcr4SqyAz1iHRHHRdwd0b5O5LGWLIfzb6qG60CVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778358463; c=relaxed/simple; bh=BXGE2LEKWBZnOm/6Fcn9tkapQ4L2093rEDy619RLO1Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e7rchGtA69JZL+7RYcbgvRmSTISSN6KXRDtWl0H0+PZ9E3sUgUVe4Rc2Jcbx6FRhhyNqqUKfkGbm75znUvF5t5V2ZuNlz04Cbixm0aXBYAKx2MD5EWV9bLtuylKOyGC7obhQ7vRz6jxX9n6Z5OVs7vOgbshTpNKYoG2O0ureUkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b=ELvjROb3; arc=none smtp.client-ip=209.85.167.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b="ELvjROb3" Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-479e4835e26so1858104b6e.3 for ; Sat, 09 May 2026 13:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1778358459; x=1778963259; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=f892GKIVoGJjwr2qfzZ9p6O68IlVvJJpuGUJC1Sd1qk=; b=ELvjROb3YvsgpwvDAPmZptcVHuklqh2xbePHkXcWdaZJWEOdVG7zLyBosG4YhTI51U yhNxbLO9B0dutEf2AO53VSa/p5Hy2Rpj74WDGbhdyG3sMOVoWlR7MlFuGEgWC+K3c0Wc lZGsIRxss6D6fbP1u+24N8veWAyUtzMgALs97TPVTJuBnaGH/yaLVor2m0wj52taxab4 /HojUAzK3qiw41RTtrKndi0/RTkPH5wwMrlGTnrvJy7oVLDwW1foPYDRcq1F1A1NDQ0A Gkjl/Atutj6jx8254fK/Q7/d/16KkJDjD5rG1qXrHh4xb9feqTDhf0I/BdlmxZ3g+GCx pqjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778358459; x=1778963259; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f892GKIVoGJjwr2qfzZ9p6O68IlVvJJpuGUJC1Sd1qk=; b=H/y7kdnaF5i8qR5dZaIvcwHZPrOmjRHM1s//8WGwUeY3vweGPU9WnY5ulKVdKzNlAR D/eVjjJ4VnAcWzebnBCYaVjPOXEFaRjSdIjq1t0sDVHWj7alf5XqsGeW7Ex5BhoN9qCZ AKXAddPWcZSu5qRSEARDYq2hFgEV4nkjqajk+zbX/jftkvssH5mG3O3qxLrLjriGqgqh Xszo6uFVYBWfIHN9I82yn+2kEW0MLmpI462Dv07xC2yOoGQJANnD1irGkq6anaYlATnN RqxjjFlHCJiDzuLr1JjLJKYtB7k9+yGvy1tIOdmL6ifeaiIiH1xux1B3CW3CZEL/j2Ep bdlg== X-Forwarded-Encrypted: i=1; AFNElJ8KMYy+i16JbtWk+BA53GqTdQ18xEFqeRklI5S/mitXdssjK6Mj+l0k824nyy0T6Js7ufLMUeUa0FVYop4=@vger.kernel.org X-Gm-Message-State: AOJu0YwdVxiO9XkzPwAWJBDrxF1L8UshTFr/rzW4CRorVaUOwMZ40w9C ik8INMaDQQ7EG2w4pwgvEaETxZptTeKcWeNo38oM0Zbe7TDUvhX9RJxBpYehnNLGmgE= X-Gm-Gg: Acq92OFvCwNRbsYyNoz8jSIx6EB6rrUhaOCBo0JxZBV5tW0+Tdv+OJ/dsWeNVdVLu27 R/DFJ6J2g+ilg572hpZi0b80R9imnGT/Nc32Zon5fxyvCgfuLgjClm4h5b2n4Vkw8KeaFYJRJdw Qvo+aupgy3Z9pq55Gx+vIa0MKbBq413wlw42hWH8X7KuaIQG5MQ6GktlogxG7w2qQZlpQu8IOoL f7HjfNqCcC9rOu8QfJayO7Ylyr8V2SEZHHsFa7yvUmM6KRC2HwlC3/TCOa4s+HL/5nDbDQ+ftv7 EaAh+i+ag1oKJO6ds10oIZX1pe/OMRvDRQ9otJXf0/jkhS5qjsE8CC95M1AE7U53m6qhTfnnQKr DosOi9eIrPTLBCCsylC2Z19E6L80iU6aRTfLcG0f+l4A9If2/+Vo7zYXqw3Ni5F1stZU2LHF8et qXzV8rz//6qzFuAlOfghfemMVuulWisInEz/4VBlD996fk5y08RDj9FuF/OQrQEdtLYsFtgxWnD Q== X-Received: by 2002:a05:6808:181a:b0:467:1e5:6768 with SMTP id 5614622812f47-480425a5105mr9549836b6e.43.1778358458818; Sat, 09 May 2026 13:27:38 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:3548:c22e:ea52:dbc7? ([2600:8803:e7e4:500:3548:c22e:ea52:dbc7]) by smtp.gmail.com with ESMTPSA id 5614622812f47-47c76986f9dsm17344625b6e.16.2026.05.09.13.27.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 May 2026 13:27:37 -0700 (PDT) Message-ID: Date: Sat, 9 May 2026 15:27:35 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/3] iio: adc: ti-ads1298: Fix incorrect timeout comment To: Md Shofiqul Islam , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, mike.looijmans@topic.nl, nuno.sa@analog.com, andy@kernel.org, andriy.shevchenko@intel.com References: <20260509151959.3475-1-shofiqtest@gmail.com> <20260509151959.3475-3-shofiqtest@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: <20260509151959.3475-3-shofiqtest@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/9/26 10:19 AM, Md Shofiqul Islam wrote: > At the lowest supported data rate of 250Hz, one conversion period is > 4ms, not 40ms. Fix the comment to correctly reflect the timing. > The 50ms timeout value itself is correct as a conservative margin. > > Signed-off-by: Md Shofiqul Islam > --- > drivers/iio/adc/ti-ads1298.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c > index cf5f954206..186bda3087 100644 > --- a/drivers/iio/adc/ti-ads1298.c > +++ b/drivers/iio/adc/ti-ads1298.c > @@ -210,7 +210,7 @@ static int ads1298_read_one(struct ads1298_private *priv, int chan_index) > return ret; > } > > - /* Cannot take longer than 40ms (250Hz) */ > + /* Cannot take longer than 4ms at the lowest rate (250Hz) */ > ret = wait_for_completion_timeout(&priv->completion, msecs_to_jiffies(50)); I would say "lowest sample rate" so we know which rate it is talking about. However, there could be latency in the kernel delaying the interrupt from firing. The kernel latency can be much larger (I've seen 100s of ms on old single core ARM CPUs). So I think we should mention that in the comment as well so that no one is tempted to set it to msecs_to_jiffies(5) (or 4). Even if that works most of the time on a fast machine, we may need the longer timeout on slower machines. > if (!ret) > return -ETIMEDOUT;