From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 3662E331EAF for ; Tue, 9 Jun 2026 20:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781038265; cv=none; b=DwGSwLLV4QsAumOboNnXI5cOcL0+wQ84faUI6Ks2BBSev2D3yuYDePNaBKkB3ZkG6wQGY8cfvGDqZGUzQnHfE9OSjTn776ZttNv1zOlOohS1S/TLZHktHvBBh8qB7a1Nx7Y35g0C6VlFm3PZ/1CU7hCD9FhdNWRCGjy6MLVMKXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781038265; c=relaxed/simple; bh=ytyM0ohCPscKcRAsiqq6VTb2bKPUXGBz7fqKl3AsXAY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Jsj2GeF4bheFGWmt4u/jHFOaZSyHLWvjMjXKVom99bqBp5Oy4qzFrpIfUaAAEgs9vTUflGqO+jM9O+daVtRoTnZmc4p/+bEiG2J4vZFRxGjFR/gtHjYSw0w3FLCFTswixznw8F4hFUbXn2IfK/E/HvWv3pz3WQCoeVDU/dGaCR8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SQ9mt4x1; arc=none smtp.client-ip=209.85.216.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net 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="SQ9mt4x1" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-372b4330deeso2135708a91.0 for ; Tue, 09 Jun 2026 13:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781038263; x=1781643063; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=9wsVO7WJMT3aLMJb2s6cZ2xInbAc2bWqJEVVcktReD4=; b=SQ9mt4x1ImQdPzKazlIf0zVaAMkhZpTRfxdZJ/+LFQu6DUbwZ7mvPsM8BJGU77AYWS XADvep4QJKo8p95Hxi57jmISTQLuG9HNp+NRD0epBBjY9sKGz+2ae+yBMFTaq2+xZ0D6 dsj8/kFoL/L0eeAZ3wGl7FgshHMU/WLMMTmh0jCTsS/e0puB7eMcX+90MNQyICzh3YqH G3c93GpxWrgYWBZUsV6aTgZmAR+uI/XzZQGvqxZFLoDLna35tN6LMdDBMhQ0n9GDtwtM 1MYQCKyhO/nrUw2u8LwVf5VwdKoGms7u936x/OoHvF6ShXWhPpGiGR0ZxCi97FVuVMRk +G3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781038263; x=1781643063; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9wsVO7WJMT3aLMJb2s6cZ2xInbAc2bWqJEVVcktReD4=; b=rhotr523WIlJP7ldl2KUdMiUKpC6nILP03jkrybPluElc19kM4l1mwPWFL1oLO1D5h ak51mJR4dYR2MNfAznI5E5xWolqGMVpL0wuo1+5zUr3vsPBjLKgV6uPIXj0u+t6bLFhI DmZv5XxIMJHKD5jpQDsVz2/SSA81Pt6MqeZJhdoa3HXOdCSp3ZHbVcjGIS+E2cb9rO46 eaODrnU+pV7fV7ci69STJAjjDQhiiaS9nmOtnKxKoau7tq1ZDw5LbaGCL2qhLQ3Ip7pP ncICEbxMV+BWiq3oKx3sOBa4wVEv3hfJNA3LQPOIgHGK+1hmo/Srxbesk1A9y8HYHWn9 t09g== X-Forwarded-Encrypted: i=1; AFNElJ9eLprgrDmtghCiq7aM9T6B7q9i4bvlLp/cvWF6qVFfiIyBSgsA2iji807xaMcnoVyoDUCg103Kr2v1els=@vger.kernel.org X-Gm-Message-State: AOJu0YwDsHsM9z6Ad6Ya2FORZ7fPOEv0BHxZdvUtK9XQI3u6+TOQCybj WQo31Pl28bEyZAFcx79OKuxPXGrUUDmYsPPLpLBT9QSc9w4uqYo43s5T X-Gm-Gg: Acq92OHg9P+FDBFnrpnxskghkW8Z81L3xcRcJU9nA+G3VFsBDMeSIwEf+WHBUyARaQI trQPgn6w/tzS6TEzM1a3kA7bd/sGJ9CyEuHOCqHfEwHWq6Vxfa5guDut8DDasFXJpWAnC+LGjVN 2p8tPd1gfhNmQF3WL29szW/u6tQseZVFzlP/oT771kS9Vu2+DsCkrSIh4G9hP2OgKiIXqat3b64 9j2SDarC4Xm5OdM0pNXKNmm1cNsGmKAnHYqmwuOqDRqNihfSo+1YXd6ic+rtaRNIXLIYx4P9dAm VvCmcs5R8yDfUSzN3tJ90cGz6KIccdyRZQZOeEMFnnXtBjaEjpkiurR48EzLGepjnc2yHqQKMwC L+wSerHFjANOqyTSKYtiqmY9X6BCM6UHNmQPF8D9xmP+O2KJsH/gmD8ErD/rd8+429ZXfAm47GA YWrJr2RNYR1fJ2I6RGDMjLSYWMcIBcQi461/F9ROP6Q7MRLig= X-Received: by 2002:a17:90b:580e:b0:36c:e254:4db with SMTP id 98e67ed59e1d1-370ee544633mr22312274a91.6.1781038258678; Tue, 09 Jun 2026 13:50:58 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37625ecfe47sm194958a91.0.2026.06.09.13.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 13:50:58 -0700 (PDT) Sender: Guenter Roeck Date: Tue, 9 Jun 2026 13:50:57 -0700 From: Guenter Roeck To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Benson Leung , Shuah Khan , Guenter Roeck , chrome-platform@lists.linux.dev, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] hwmon: (cros_ec) Implement custom kelvin to celsius conversions Message-ID: <6b3d438e-ba7b-40c0-8fd7-7e6eb1708a90@roeck-us.net> References: <20260529-cros_ec-hwmon-fan-curve-v1-0-da6792b3830f@weissschuh.net> <20260529-cros_ec-hwmon-fan-curve-v1-1-da6792b3830f@weissschuh.net> 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: <20260529-cros_ec-hwmon-fan-curve-v1-1-da6792b3830f@weissschuh.net> On Fri, May 29, 2026 at 10:31:52PM +0200, Thomas Weißschuh wrote: > The ChromeOS EC APIs use integers representing degrees kelvin for > temperatures. The default conversions from linux/units.h will then > always convert these integer degrees celsius with a 150 millidegree > offset. This is a bit confusing, as it also differs from other CrOS EC > tooling. Internally the EC uses a kelvin to celsius offset of a round > 273, so the current conversion is also not entirely accurate. > > Implement a custom conversion which preserves round values. > > Signed-off-by: Thomas Weißschuh Applied. Thanks, Guenter