Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp33988lqj; Wed, 10 Apr 2024 03:07:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpsbpNTmbaMylAYWsf9ppTxZRvF/UGDliCxZY8faRiszDqb2otUDKQpCQUXwUIjjRX7Gd1wF1Cd4NYp4XYtIfqsS5x9wb6gEoylg+bew== X-Google-Smtp-Source: AGHT+IH+l6v42IpjMri5olYVF6jOint/s4s4vpZqCJab//6bI3XM0XwEDtHUIj4GXYwpb77EWaz/ X-Received: by 2002:a17:902:e80b:b0:1e4:2859:e59b with SMTP id u11-20020a170902e80b00b001e42859e59bmr8922555plg.28.1712743665583; Wed, 10 Apr 2024 03:07:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712743665; cv=pass; d=google.com; s=arc-20160816; b=IcYDQmfIB5skNlmypamMCqpLutLNeULSKiRctBC1fvMRz/twp4DEXYhsTEI16kCg3C xvj3CcrPrCVkD4/MLk5HGiOj6dudmc1KRIojXJIJjdCjx2zYs6Hi8G3tHWrKTDwzTyzv u77TSbyiFjV7TCOWUmgRZClZLlhbGzRs5QYHtUDav4EwUc9JVYD/KS1WFfXYXrGhvEIF cQfLqOA56vf0bX3egNrDbyfYVhJoFpbSEh8Ka+vr/sMXoCL9ZsHHUEIx/ohzKnLthiNk Ap0XM/RpqwLPlr4mKT7Swxx2EKaN+MKIm7rp14cguBoLK94nECSZCeZnOZ5DDCQ9nXp6 /2wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=zLQbXGwtJnz9iLue5Wy+z1JPH+q+yPyB3yik9mruRQw=; fh=SxrY6zMeHVB38zaOuhLoQzFnJuGVzPILbuWaUGQNyjo=; b=yEfcJ/H69xqhTL59+P7JtTn5CktgfRot6sjLiyIuY8TMZrachv+pRN25QlBVuwMoFT OLuCAQxxhNV/Kq/YfhF8r3ECZbY7PUuoMq/cUTurvobc6fjV42f7jGewx/cE0Xw7+VuF a2KeXSJlFwkEWoquO6kBX+f4iduqtIz1xcyDFqILX7MNRUW9+cB3mtbC+YVF0jBavTad 0QvfD4qKYmdyjcRi87V/a29+odFbpiz5cbko6j2ECx80ki5buHBnjoel0tLxk+JOLC9p NhcE7QYA9sRpRIjtjyk7G7j9b3BCRROm6Qelwiw7MMvC8iIdKAyDn7T15QcziIBqxnjo OiJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=zDaaLyvD; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-138305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138305-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d21-20020a630e15000000b005f0a524ab84si10258059pgl.404.2024.04.10.03.07.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 03:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=zDaaLyvD; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-138305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138305-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 40F3828520F for ; Wed, 10 Apr 2024 10:07:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 323E5158D62; Wed, 10 Apr 2024 10:07:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="zDaaLyvD" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 9A2D013D606; Wed, 10 Apr 2024 10:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712743655; cv=none; b=RKTzAe4i8YOoLg8+7HZrU3TGCxTrbg3NXggsvuyB/3HRDJAUCUymdqmotsR6K9t2WkGfZdGxpIZLqdVFq+zbK2UaVT7c45NMiuqCC7i9kRWt8BqjuY+b75oVa8RuyuSgI12cxhR8JINcqBE0C0KivUVtMcfVfHkK3Tvy8zogqOg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712743655; c=relaxed/simple; bh=L7YBVL+XZ2VzkgoJkD+hlJcRUOM0nGUw0aD6v+UvR1I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XmVb1A2VYeJZBOH/3KtazMnBmAnABTjYbBtdVsffRnDyT4a1Gk8chf+inDLuFRDdf7+Qt0ajQ3JhdT1u58ESM0Qci1dloSS9jbkkGfu/1VJsR/uTML8r7Kj4UntPDW1LGTPTVOViikn4+y9iS3yOgpSsJya4J3GtyyJG9kZUgbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=zDaaLyvD; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712743650; bh=L7YBVL+XZ2VzkgoJkD+hlJcRUOM0nGUw0aD6v+UvR1I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=zDaaLyvDnhGU8YvyVvaBf45X06tNM3lZGjEFYYBIDpNMabnM0jTsZhCK8AflDmL4c yHIeqDvSrbvbTfqfKXBmGKi0FSHVCbipEoHLpFibLeZQHOij6FlNssiGUkc9ZPz7J/ A4zZfAakrVAHUiy3LG0M+vkQMLw5eHGJ3EVF50CVmwlmxPHJl7Gv8Dhw3XYpRGBz2O lU10xT6RCwXVL6p0KwOQiCntzwh0CqueNZj1ZByppKOXx8Cs3WcANhKvanylO1MaDA WXclW8oNrSmIJP3rkYtqfNbIYp+klkM8PxWHYDgHVO40inPr0YkgxiDpIJ4JjhCtvF PKni27OE4To2w== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id AE18D37820E2; Wed, 10 Apr 2024 10:07:29 +0000 (UTC) Message-ID: <30499665-4182-4241-86cd-1ec88c719072@collabora.com> Date: Wed, 10 Apr 2024 12:07:29 +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] thermal/drivers/mediatek/lvts_thermal: Add coeff for mt8192 To: Hsin-Te Yuan , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Matthias Brugger , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , =?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 References: <20240410-lvts_thermal-v1-1-ee50b29c1756@chromium.org> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240410-lvts_thermal-v1-1-ee50b29c1756@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 10/04/24 12:06, Hsin-Te Yuan ha scritto: > 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 This is the same as LVTS_COEFF_{A,B}_MT8195, please just assign that to both 7988 and 8192's lvts_ap_data. No need to create duplicate definitions. Cheers, Angelo > #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,