From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 99D78352C28 for ; Fri, 3 Jul 2026 20:42:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783111347; cv=none; b=E9lGGFwfmOB7ERVZa+D2CEYJPTBdycXc/8mrkC+N4yOu8hjNBTmv5gCczbBTN/leEojONLDigvyuxhwicVennywgPUmJNeRAjGW9vDxHURVEh52G9WtndS5TNT+eQI4nMaqK/n2G3xeGvUHaqTw2m80AqPa3L42fmtkVN8YP3Gg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783111347; c=relaxed/simple; bh=aGFBNu0R0Fx38HXGTTCWkfbep9h2lkJagWvGBC1mueE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mKc7GhgK9phatoZZdwWvcjqc3aAajBlUT62SJlSt7cmqJCmFhOIHDN8pZxre+1sZXVQcErE8CYJB13sigXvwYOcsodBz7x8xIIXLd78eMCeHkk8JbVC3iGGymg7w39Fo4GDCejI0feQ0x0I5TcJC+0aKRuKDvWLh+5+0rlPkWDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=e5j+Wd42; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=X+X06HRG; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="e5j+Wd42"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="X+X06HRG" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 663KPSHF1039983 for ; Fri, 3 Jul 2026 20:42:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= pzNQ0CYHYvK3sJU1akzqktrLVrmX+5Yc2PEoNCfJ0C4=; b=e5j+Wd42Uo9g9R/z hv8aPYUKxROFIgKvUl1UK6IsYdMTqYaLJZfFogxE3EcALL7Rv/vcR6/v/SjC7kwR y/TJ8tDoh6TVLZOtUUFUmi8mTbKrMc85qCmO0UhZqcsmknIinBAAuQNgdlM+2xA7 jlt2xZaw6azhicnh3SI0eaeWIlrJAcqBLSayJTJusIfpHa238aulQEPLMTbN07v8 GeZHQuxfBNuUo8uyESc61o8CG1t7HXFMK83zDq8qTwxyZCto124Q67RAxwZKgnzy s5fMRITJ7xFx/T9yJTSSPI+7LCv0QFpwje98HAGXjuCJ3YqAGTUCXjKfElCCCeov 47eFmg== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f6a84a9vr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 03 Jul 2026 20:42:25 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-92e538afe65so90552885a.3 for ; Fri, 03 Jul 2026 13:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783111345; x=1783716145; 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=pzNQ0CYHYvK3sJU1akzqktrLVrmX+5Yc2PEoNCfJ0C4=; b=X+X06HRGBUQoCEeW2QM5FKLSW/d6k8Nym5BcsE6XetQhjE1F5ySI6Fzp05lywtzqe/ JwfY8g3puh2fKIUvyCWZpCo2pJ6Lwc+4Us1s/1CrOz6uafE7RR1Lx/gNv9zzd2Oxx39W qzB0XKNf9Ag9MscTCM6BtSpNfNBobr/gNyryCws6m7Ewxx57yw5mED1PKi1Z/HgAvVvM RdFhY5a5UNP4qUE2+TUMdJ1LUr1YpPV6KUOvxezf/c8FLIkvJeIoCV6uEVosgv4LSlmX 47b26JYL6W7ER3Myjt1umC7aEx6kSF7vEC4p81dXWDtm8PFo1WcaNtf9zj1Jp9OQNL9P Olxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783111345; x=1783716145; 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=pzNQ0CYHYvK3sJU1akzqktrLVrmX+5Yc2PEoNCfJ0C4=; b=O52oV5H6ZNoylWn26DBpWSTO1HYWJYrMEclE4AdcooNmCM+6C09WLnDfpwD9oWQ+q8 tmxNJ0TLJyvOW+MvbnERuLqxfCjy2694q6qF26hGkIRTSkORQNls/ShKph2aAwyegG1l KKtn3eTQbSVF9l112rMkCY3DOae9PtfOTOR38SdF4CnfZ9MqOA+ZslQdYDv3J+0kvdgn BYS3t6OC+rDhoQyGZWZRmkfpiSDh7Rtflgtsb5sTt6ElZcSQKowlTx+oJZyia6NS/OW3 RwRFEyJrGrScWae+5Lg9rpiXYAIVtq1j2M7h//O0udAw/dnKRHI31iA+eW88DwpWxv5R JiXA== X-Forwarded-Encrypted: i=1; AFNElJ/Y7NSllAEUFSeTxC/bfAFyP6I0JXd6O7GO02+4DCRUpTynGFd2zi5jos/A7Ga7G5C9eGOoN5Bb8SYWtV8=@vger.kernel.org X-Gm-Message-State: AOJu0Yzotb8BjDYhps86jmTaARKhaY6NUOdvNhbnsfy51u8at7cxnntJ Dg1zOaU9RL6GVtreM4keA1f1++ffpZBg4eNRDC8s7l1oAY314uTZOi7hVzkNDNV5y0Hr/SUrwo1 V8t5ipKM2iLz179vGSUtWKMxd83YwDDL7PoUtBnE9feAS6LIBnPi9fUA1afMUo34p5es= X-Gm-Gg: AfdE7ckzyDx9RE10+oobNAi2dxxh/6EbPDS3lFenuM7YEXdrgXVrG75W4eCTEndjgX/ j/OVWP7nbnxBMgObDL8WTCARDLfgJ/MmY+iVFg/ALlwu3VDEZ1yS1beaEGZMAqGBX+EevJ+AZnt a3lB3RvosQnWvpUQa5yGJxisdj3mWbhmmTG0e538nREvqqvDQ4pWvTTucZkx33ImBmTWqyMqI1T s5wpWyUdihU2dSPYUps443Ozxwotlx2+E8MHBdGjynRyOmA+z7JFwwT2qwaPu09rM0H7Gfxdlid tarJmN62yn6SKh6TZFwxvfeyWRHGNZwvdBsKfMnils65hiGNLzJhXpt0zuIgDLui2VnZGjk90Hg W5gqVV4QrA9puYIHfWJrfT2PZfDDJoYVhOw/+paj/bCY3uZYiyxHiMcsnylMCEJOMzh3G3kYyQA == X-Received: by 2002:a05:620a:1a27:b0:92e:73fc:154c with SMTP id af79cd13be357-92e9a3446e4mr163688885a.7.1783111344804; Fri, 03 Jul 2026 13:42:24 -0700 (PDT) X-Received: by 2002:a05:620a:1a27:b0:92e:73fc:154c with SMTP id af79cd13be357-92e9a3446e4mr163682385a.7.1783111344045; Fri, 03 Jul 2026 13:42:24 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:7d20:e20f:a77f:4ef7? ([2a05:6e02:1041:c10:7d20:e20f:a77f:4ef7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493c6375764sm140895135e9.5.2026.07.03.13.42.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2026 13:42:23 -0700 (PDT) Message-ID: Date: Fri, 3 Jul 2026 22:42:21 +0200 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 v1 1/1] iio: adc: nxp-sar-adc: Fix the delay calculation in nxp_sar_adc_wait_for() To: Jonathan Cameron Cc: Andy Shevchenko , Ghennadi Procopciuc , Daniel Lezcano , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, David Lechner , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Sashiko References: <20260519215607.78241-1-andriy.shevchenko@linux.intel.com> <20260522183533.358a1f30@jic23-huawei> <20260703200626.40511970@jic23-huawei> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <20260703200626.40511970@jic23-huawei> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: fdolKuFa91i6XTcQlHmvuksMXS55y2zr X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAzMDIwOSBTYWx0ZWRfX0eIggqeh0hsH o4tyoeAtZdNoXM2IUAR5nT3rOCAQp0c6HLNUm2MkOphS3f1ssD/DZ1+Kbx5kc1p1jH06htgPd/4 /rLIec7pG6wdxyMNvmu76lj1oTNw/AY= X-Authority-Analysis: v=2.4 cv=a6QAM0SF c=1 sm=1 tr=0 ts=6a481eb1 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=c92rfblmAAAA:8 a=QyXUC8HyAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=p7aEG6sLlY0yxXIno8EA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 a=GvGzcOZaWPEFPQC_NcjD:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAzMDIwOSBTYWx0ZWRfX5ZH2F7+Y5kWi NAMORuWx9s8eui2pB2tlpk2sm4Axu3k5Sz/VTlQQO+4boP9i772MO4gsWG+MqEdcTzNkDqxYdOA jnOxAbB41cPgHngtZj3PwJnl31dqaWm1XQXX+mlVdDb27yBjx0ZpmNJze9q1zR65z7m+KAwqE/4 ArmOFTwz2ZeHAVzlsv+t/0XLYTFlffl0Ioy2ipINRcV9rZVZLpVuqk+n2Kjcv9CRWdtcnmSJgMB tSr0MHgn21sB2Xqo1YDotey21KDZWrEvyCy3EuJO3N8zmYAKn487E6qsMBORTiKu3c99TeJzuZw tJof+DLb5mlfIuA6G/bF1DbiFbalIcjpWH/XMuv2M2HBUgtjHG/zIZgh98YtXiHBaSNlsTpn/nZ WtHvqHMxgymx0b1zMWfwGWCkoebWwMkdBEIZ9H3s1Vj3cftJFLVkZI0L3GIq2b9z+KploOLacRR WG5HeXVRSHU5Y+bf6tQ== X-Proofpoint-ORIG-GUID: fdolKuFa91i6XTcQlHmvuksMXS55y2zr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-03_04,2026-07-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607030209 On 7/3/26 21:06, Jonathan Cameron wrote: > On Tue, 26 May 2026 14:48:44 +0200 > Daniel Lezcano wrote: > >> On 5/22/26 19:35, Jonathan Cameron wrote: >>> On Tue, 19 May 2026 23:56:06 +0200 >>> Andy Shevchenko wrote: >>> >>>> The original code was using ndelay() twice. In one case the delay >>>> is calculated as 1/3 of ADC clock and in the other as 80 ADC clocks. >>>> But according to the comments in all cases it should be a multiplier >>>> of the ADC clock, and not a fraction of it. Inadvertently >>>> nxp_sar_adc_wait_for() takes the wrong case and spread it over >>>> the code make it wrong in all places. Fix this by modifying a helper >>>> to correctly use the multiplier. >>>> >>>> Fixes: 7e5c0f97c66a ("iio: adc: nxp-sar-adc: Avoid division by zero") >>>> Fixes: 4434072a893e ("iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms") >>>> Reported-by: Sashiko >>>> Closes: https://sashiko.dev/#/patchset/20260416090122.758990-1-andriy.shevchenko%40linux.intel.com >>>> Signed-off-by: Andy Shevchenko >>> >>> Daniel, could you take a look at this one. >>> >>> Explanation seems fine but original patch was yours so I'd like >>> some 'aware' eyes on it! >> >> Sounds like correct but let me loop in Ghenadi as I don't have the >> platform anymore to check the change >> > Hi > > This one is still outstanding if anyone has a chance to look at it. > If not I'll gamble and apply it :) Yes sure, go ahead Acked-by: Daniel Lezcano