Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp33294lqj; Wed, 10 Apr 2024 03:06:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVH3XQUTg6h3+U/sgFbAtJQrRlKpgHdTzv8qRN3yJYsVJrR7tITKDwD2I+msUacDZlY+02vLk8OSl2NNTcuRBvltpaK2liphi+uaSaFpg== X-Google-Smtp-Source: AGHT+IEvciZqCXahY67VEnIUAezOs/Qena8yLK+JV252tISP6GD2Gx7xmntFgo1dx6HAICPU4P1V X-Received: by 2002:ae9:e20c:0:b0:78b:e305:8344 with SMTP id c12-20020ae9e20c000000b0078be3058344mr2154503qkc.46.1712743580024; Wed, 10 Apr 2024 03:06:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712743580; cv=pass; d=google.com; s=arc-20160816; b=jw3/2nS3EBMgbrwaDFpYRkPfadShfQV4JKV1f87KkKqVJtlTlh8yxqF8oB1McKuwyf BtxP3+fesdjZ3V95QcM7ilGRYNpYNR7cvr4EeLov0sCKBcv5+Q62eL0Nm8sCX9QRiwar QgKUncZvEINP3AnyIxdOkM6OX6skFPIeQj6pLjixsMzk/YokZ8ipZArIMVKncq4LL3uw mqF3uwYVl+qmXjvmXuLrmGjZasvpkGHJAnJmS/YK5hTABgs1Pi4cBLdHCFiZ5TnS39vT NyH1VTijVKvy0/SexJMRx4cSDgJn6zkrvJUTcaqlf5oNupN7eW6dFcP+gmhITcErx90r T5Uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=T1LpKFL+yI+IpX+c47vgJ/x998fTDNJ7BUtB4SB1yXE=; fh=u5r0ckpQT+0h9E69mGE4q30LoXx0uVI++oNP/17o3xI=; b=gZK3I1twehSQrXJfAfou8RY2HfJ9qUGhHP2VUy69SScu3FtdUVIVs54KWgWUNpvazK gzxiRwu+mcVQCYQDbwZ+BS0Snh/qkXQXS5ao2/qxFDAX7aPPWoY98JNBEPbQ5yuthE/D GvY5BliOTU5am6ToS2j/ey0qcYLEgbfSKWqqEd+VQAU0rw4l+MAjJI+HZX/JKTd12yKf 5wR3Fv44M5keeL2Z54ZH5h64bHxjLYWvrTY7JblzoBcn+OWcLBDnNqysZGIQ+5aER18L 11HrXdx8QsZdhedrLgB5b9RVFxIkTb3WuKzqauhk+G3LxNvLyNx/G88Lnet4epLbBCf7 KTtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=G03OLYCa; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-138299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d21-20020a05620a205500b0078d5f16a2d3si8588876qka.675.2024.04.10.03.06.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 03:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=G03OLYCa; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-138299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BD7D21C223A4 for ; Wed, 10 Apr 2024 10:06:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B639515820B; Wed, 10 Apr 2024 10:06:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="G03OLYCa" Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (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 DD8744D59F for ; Wed, 10 Apr 2024 10:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712743571; cv=none; b=Gjk57GTHjZ8Q7vFCLrYDn0xSw0jhlt4S9w6OzdbSIeqRd3fPEEzbDQpgrfAPq6LSuiWxHmQAtEZ2xMymAVeKRvAUqWrRhL8kXJTCyEzpFAEXD/j+FGA3ZH1+eNB8kasErb9D9rwia1mVp+DzjBSpHcBP1HIajbZinJqNQqHW6K8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712743571; c=relaxed/simple; bh=j7jhjPXzHWwRadactMkVoJM5y4LJns+b5jjXbm6w+Hk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=gQe6hpgYrxHoMoSO1f+3o7/gc2TnzQ7Qc61XHZXhwsY3Y1wmgS20xZQnUlV4bqaca1RACyNMXhJeQtkcvhEqDPlBEVYl9vZC7Q0Q2xqqIQwX3NXqjMU3SyBff9H98n0vJ8oWeEbhMeGu7TZIOS0QfVo/Kv5GsW7TJi/CNDPt0Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=G03OLYCa; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2a5ef566c7aso100896a91.1 for ; Wed, 10 Apr 2024 03:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712743569; x=1713348369; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=T1LpKFL+yI+IpX+c47vgJ/x998fTDNJ7BUtB4SB1yXE=; b=G03OLYCabSasZG4X0lQPnSwxyswsZ5dXyZ1vMfV2pfL64kL2NSTIHSIcBW3nEXK69W edCg2jhxwSwDUYpmW03kpPh6lUkH+mlBYTVi4BnAcOoSXJgTR/9sIeIG2EOybpFvXapM UkTE+DUXtWQAE14Ov4oKzLmhn1NbM58cRqn8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712743569; x=1713348369; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T1LpKFL+yI+IpX+c47vgJ/x998fTDNJ7BUtB4SB1yXE=; b=QfMDF+DC1mIuuRiTgYChvegg+WCWxqQYT76UangaeCjq8cCXqhLNp4Kna6flA+dGTo j8nVDnEHQ1qOsIXY15q3sDnjFV075q7rQNTLprn5NwAQw1a+kQMm+j4aHiYpId+MW8Vb Vs5TFUk0CLry5faIQrgalmK81xzQbTN1h/ZmhwOEv1LxHrsrSGAJ10eGpTLwC0dwHcLL M+KAwwpaTS3CEqVkfSvuqh8wcGxIjE87dK7U3CZr6vk2cIfZ+QCQNJyP5GLHjlTFPqGL VR7NgsAOtsOAnPWXvgx3ZsSjs6+jthfoM0p5HlX9MMsDYgoMOrcV1/LwgX121xhXBtSj qY+Q== X-Forwarded-Encrypted: i=1; AJvYcCUVUII9sx3LBYW7yMH9hGSRiZJ1zoVdHqSXjQo3i10Z3EMfm7DBghmx++u/30bfOl/mKao703yvgtzVN+xrRI4jVZwjhE4Va1IEqvLX X-Gm-Message-State: AOJu0YxY8Jay/I2Zi+qi+gfTB9330H14+N1J+rSYlRueA91V8KV01AmK u1Kkba8IKGAyyRbtyf/MkMwPgWEv3blYAL8R4u3E0+vtDvrit1y1IxYd/TZbJw== X-Received: by 2002:a17:90a:e514:b0:2a2:672f:ef66 with SMTP id t20-20020a17090ae51400b002a2672fef66mr1861559pjy.7.1712743569253; Wed, 10 Apr 2024 03:06:09 -0700 (PDT) Received: from yuanhsinte1.c.googlers.com (88.216.124.34.bc.googleusercontent.com. [34.124.216.88]) by smtp.gmail.com with ESMTPSA id a11-20020a17090a740b00b002a4ce78e3e8sm1014434pjg.35.2024.04.10.03.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 03:06:08 -0700 (PDT) From: Hsin-Te Yuan Date: Wed, 10 Apr 2024 10:06:04 +0000 Subject: [PATCH] thermal/drivers/mediatek/lvts_thermal: Add coeff for mt8192 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240410-lvts_thermal-v1-1-ee50b29c1756@chromium.org> X-B4-Tracking: v=1; b=H4sIAItkFmYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDE0MD3ZyykuL4kozUotzEHF3jFGMzUwsT88TktDQloJaCotS0zAqwcdG xtbUAtac9M14AAAA= To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Matthias Brugger , AngeloGioacchino Del Regno , =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= , =?utf-8?q?Bernhard_Rosenkr=C3=A4nzer?= , Balsam CHIHI Cc: Alexandre Mergnat , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Hsin-Te Yuan X-Mailer: b4 0.12.4 In order for lvts_raw_to_temp to function properly on mt8192, temperature coefficients for mt8192 need to be added. Fixes: 288732242db4 ("thermal/drivers/mediatek/lvts_thermal: Add mt8192 support") Signed-off-by: Hsin-Te Yuan --- drivers/thermal/mediatek/lvts_thermal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index fd4bd650c77a6..6d226c3e135ca 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -80,6 +80,8 @@ #define LVTS_SENSOR_MAX 4 #define LVTS_GOLDEN_TEMP_MAX 62 #define LVTS_GOLDEN_TEMP_DEFAULT 50 +#define LVTS_COEFF_A_MT8192 -250460 +#define LVTS_COEFF_B_MT8192 250460 #define LVTS_COEFF_A_MT8195 -250460 #define LVTS_COEFF_B_MT8195 250460 #define LVTS_COEFF_A_MT7988 -204650 @@ -1530,11 +1532,15 @@ static const struct lvts_data mt7988_lvts_ap_data = { static const struct lvts_data mt8192_lvts_mcu_data = { .lvts_ctrl = mt8192_lvts_mcu_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8192_lvts_mcu_data_ctrl), + .temp_factor = LVTS_COEFF_A_MT8192, + .temp_offset = LVTS_COEFF_B_MT8192, }; static const struct lvts_data mt8192_lvts_ap_data = { .lvts_ctrl = mt8192_lvts_ap_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8192_lvts_ap_data_ctrl), + .temp_factor = LVTS_COEFF_A_MT8192, + .temp_offset = LVTS_COEFF_B_MT8192, }; static const struct lvts_data mt8195_lvts_mcu_data = { --- base-commit: 20cb38a7af88dc40095da7c2c9094da3873fea23 change-id: 20240410-lvts_thermal-3d365847acff Best regards, -- Hsin-Te Yuan