From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 B241B43636D for ; Tue, 28 Apr 2026 16:13:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777392831; cv=none; b=ATWNnQe/mk2a7HtgACjXSS3KOjz80/aXFeVsAAWtnr7pGjBD15cbuYafq9LKicioOUtIXLiGAEz0qNQvDfUQGSx7Qoq4+cVBl3megz3c5HgujJwMomk9X/I1Xdet3MTAwm9Ne/IM9gjW/ehcE+xN9A5RNzg8JYg7yOVEzg4jmRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777392831; c=relaxed/simple; bh=IKjtIqjdI0KroHbshpR/qVO/AeGrXLF19RtAI/DwFIw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MpwUJNjrTqqbmPolG9v78eJduPHDkZ261rPZsVtdogDCaf9rp+K5OT/e1mul0Mp7IJBrv710NMQQiyMZZx++JZ1+zT7xN6B/RsZnzxMbswRYz003FwHehzRoFMmnOYYQ5CsAr/Tb2hDxtFW8NNQ28YL4gaK8DPJEIFSJg5oZnnQ= 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=kjPvHXEn; arc=none smtp.client-ip=209.85.128.50 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kjPvHXEn" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4891e5b9c1fso101035385e9.2 for ; Tue, 28 Apr 2026 09:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777392828; x=1777997628; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=6PUWNGK9QNuvgnwMGetaAkISiEjmtwUs0udSoP/QuEY=; b=kjPvHXEnDLgeLJd0JxzsDztuB3zepmh9D68nBv9Q0sjrsld0zzFmdvAk3uHziBMzLn 1HBnB2rX/voW1tREzbMrzd/c1KQb7XJSX3dik9IDp3Sw1PLAH0UXabQQU65noD0LwLOr i9/+fDKitvKurGIwCFKNLHX47wLoaxQTX0bIPIjFRbaeDRNapTf43X6GyrW7zQFcoy1b pzy8N/6MHdhrGXexyY1hkST1oMbECLXuNyzd8iAFZO2OvwfUh4G/f33FaQwN90PXGsXg O6XVWCSUIQGD2CSdI3JQKrb03jrdmiJBTlrBEAGqDHRDnxwxBh96zIbw07jv258Qqsao jRPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777392828; x=1777997628; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6PUWNGK9QNuvgnwMGetaAkISiEjmtwUs0udSoP/QuEY=; b=kjpmG9Y0Fqr1pGVYGlDionBmrC8AvEO9FmBHs11pCsc3Br0Gau6nVVp4oUOahlVkR4 O8CUTz18ej3hj+yjs1pi8NUcacAGWM+WLeJdjADHr4DWfsgDTUPo1LAc2DYTOt5BGDPu bdXa2L/vPrGMi2tC4o2yLOIpK5VuI5VOHbhaHKgAucO327esQqsYWOb5PV/BiiRwOfp9 oSSNgvCNBygSX1pphx+uqYivN6HB9E0Bl7kTtetF3RYsIQ5SWidjFg7EQxtSSVvmaUDD 2oYvdFIMyGRjsaFzW+KDQdZ6ezSsLow2v1hLriFl4I1wCRVujF1n8CBmN04tGQxRq0CW 1vTg== X-Forwarded-Encrypted: i=1; AFNElJ8zQzMm1pc0NXfQYxiyRRsqjwNr/N6nR3B5RUDos4MYbbQ3iFGJ4RRh3EkURMRSyjMtqKwVtlAMf9h+j1A=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9i889HW86i995+mjoM3Dkn3dNTOw1Ce8AGmFbjG8OIx+6Dq7b gUc8xs31gmHl4iLHjHNstkfqQPr3KFNiGckoeRt+COuxuUwUnw+n+u5I X-Gm-Gg: AeBDiesgcUJf8B+q1Tcvmvvmg+RVLHtaaRABxaZX8slmdZH7Z0FsZiEG1CwqccjJd5y xWjlO5bVPqHoLCp0jxwMyHZPzJdjmu9QiBOuNMnmbus8y1dHuk8A8Sb4l3omgHl5Q4M4fKyJrpi 9NqWluqpM3nZv3FWpv/kkMm91+TgJzmQD8WY4xiKKnGFqYayyWBYNv+Ih5Ty0oy4iZMz4x6Zhyp YK1s+ML0VgD6qYO+1N+zmVI6lakAdEf8bd3FBG/hohF0nOlUJ9hx8B59O2fBs4QrP7udMr3cmCN Ns9rbsm7ZwEY6WRqMavLKG1nfDtk7bSznR9Tc23xNfYYcmd4TUxUmO56C9G8EhE2R9x2qvIj91A TBpnGpXC9X2QZcATcjlKf2N0mDO1ntsFYtFUyjWP9RDBTFCVMS3MAhD/yTV3zoQJQLjh28OgHbW VMZmTkl1EV56950W+lWxyiBLU= X-Received: by 2002:a05:600c:3e19:b0:48a:569c:abab with SMTP id 5b1f17b1804b1-48a77b12a61mr64602415e9.14.1777392827523; Tue, 28 Apr 2026 09:13:47 -0700 (PDT) Received: from pc ([165.51.114.229]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7b564c53sm3354945e9.7.2026.04.28.09.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2026 09:13:46 -0700 (PDT) Date: Tue, 28 Apr 2026 17:13:43 +0100 From: Salah Triki To: Andy Shevchenko Cc: Marcelo Schmitt , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] iio: temperature: max30208: fix wrong scale value Message-ID: References: <20260428155349.68019-1-salah.triki@gmail.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Apr 28, 2026 at 07:02:16PM +0300, Andy Shevchenko wrote: > On Tue, Apr 28, 2026 at 04:53:49PM +0100, Salah Triki wrote: > > The driver currently returns a scale of 5 for IIO_CHAN_INFO_SCALE, which > > leads to incorrect temperature readings. > > > > According to the MAX30208 datasheet, the temperature resolution is 0.005°C > > per LSB. Using IIO_VAL_FRACTIONAL with 5/1000 correctly represents this > > 16-bit resolution. > > > > Although this is a change in the ABI, the current scale is objectively > > incorrect. A raw reading of 5000 (25°C) is currently reported as 25000°C, > > making the driver unusable with standard IIO tools. Given the magnitude > > of the error (factor of 1000) and the fact that the driver is relatively > > recent, fixing it to match the hardware specification is necessary. > > Seems the analysis is wrong (as per Jonathan's comment in v1). What are the > user space tools you referring to? > You are correct. My analysis was purely based on a misinterpretation of the datasheet's resolution (0.005°C) versus the IIO ABI requirement for temperature (milli-degrees). I assumed the scale should convert raw values to Celsius directly, without realizing that '5' was already the correct value in milli-degrees. Since I don't have the hardware to verify the output, I relied solely on my reading of the datasheet and missed the ABI unit convention. I will withdraw this patch. Sorry for the confusion Best regards -- Salah Triki