Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp28389lqj; Wed, 10 Apr 2024 02:56:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBEWNUbYzVZRsBH7S0RHYP+3GKMb6e9KDf21T8/W/wkTjYH4Sn6AQDwWdwenV6YTH+/CeHcGy3ObnJptSqlAl8wHyJ9iLgO07xqW5+Ng== X-Google-Smtp-Source: AGHT+IF2UPQziOshp68niDH2YYR/ECbiLdFXk+Qe8Q646HoOc3QjqMdXCEj55qX/Haxdi077hoq9 X-Received: by 2002:a05:6214:108e:b0:69b:4341:6477 with SMTP id o14-20020a056214108e00b0069b43416477mr3126qvr.26.1712742965087; Wed, 10 Apr 2024 02:56:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712742965; cv=pass; d=google.com; s=arc-20160816; b=RZi+bc92dqYmncFZ2f95oHMrFx+ihwV6pZGX4iT68wqk8b0VFWYp6vOTzPu26INR3d dVF/HsEAQyYw30sAh3UB6xlRDI9eAmRvoUNay6A7qnS4n3WTdFBmBpMsGWbzduAjoaRV p/rBTYOznxYk/agfcywS802hwrUUTTUXFZAS3FtP7bM4O4XS8ctHQ5AQVz6nS8DRhLzh 4jxUlLF9hoAKGn6QdADYxT49Zs8f5+hBbuhju7VJ+lao3yj/eWy9cFgoQEbLGxqXfXDy SlvFZe3gzHDHo/te8/jSDAGruKO1r6nQjFv93BVokvsGMg/567Br4KYNXnTys4ZU/K5N oOfA== 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=TcKpkhK7yC5OOsiI8Wt9Qnd+V1jtIodBWge1iHuZc1k=; fh=HDm1REhLN0K5LrF3xC42hB36PGgeN0ZrPh8A9LdnJU0=; b=ZOzxt2E6++vRLhbk/pE0vSffrakGyIaK7acWUGaAzQ03cTsVkb2KcA5cQbAqv8l+PX j/rrvIeAByN27XBwO4NEFPlMDHeUx2H3pZj4e4c/JGaU4zPBcURWxNPJv3yiOpg9N2zW daQ+J+sxTnW8/sdfE+A1ugdIha8SVq7KSjxIxDvBzg3oipmUmo/oFK5L6w+bU9A6G+3P zzWNpqEfCVaDPTUHUStRLIGvq9c9TOQXbi1hcntHWjYFEX3SQ2r99GaXtto2wDXAmbkI 8Bgb2LfIu8GoU5/Fx2oM3Tk30B0T7wjUZaxRKdqVAwD/K0CGsq9uS287sqcCJaPb6RuX 8Uuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="H+y0ra/c"; 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-138289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138289-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m13-20020a0cbf0d000000b0069b14b2355bsi7230624qvi.8.2024.04.10.02.56.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 02:56:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="H+y0ra/c"; 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-138289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138289-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7179B1C20B1A for ; Wed, 10 Apr 2024 09:56:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AEB71586CF; Wed, 10 Apr 2024 09:55:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="H+y0ra/c" 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 B12AF8BE8; Wed, 10 Apr 2024 09:55:45 +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=1712742947; cv=none; b=dnPh5pWoEunsBPRCe8W5TvqpD4T9BL6VVP/yBDdkiYHcJl2Ca9RSYd67N7GN/hngRqZY1qb7wUkTI9legULLpZ5bM5UfjDunWOfq4VXcrZM8t+v5u8Q0rWTN+pgyDK9ieOoq1WCaYtuAZ5EessJFYPfjVqCfNMSOXFwFX7boqJg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712742947; c=relaxed/simple; bh=vtMV+Q63GqmW7FHaxb//RVu//0rLNFnAcEs9bPdrm4I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=D2yhfhR8AV3KMoJ6B4HQBPOa9XS/+IZmSncG+lscza0IHAlyHyLNye6HVtOC9L8EZP7pvxlNhMbaSiG9TivEYbPsGXXF541O1l9zL+kcvBXZ12IpEXPlVfR5fdAHCwufe/wn1lfxd9FMzBX5rWDTa3V5AuDeYOnwxz1vgG0ngWE= 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=H+y0ra/c; 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=1712742943; bh=vtMV+Q63GqmW7FHaxb//RVu//0rLNFnAcEs9bPdrm4I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=H+y0ra/c8fi8Dwjg9BpujJCQ3xxygBdVjA500qeuCeFzp+ZJCdVlH8vvyIyeB9HsR DA5s1nO7qp99kI1dgRqnd1PTbpBFjs85i5qV3Hot/2ZAXB89CtB/5J2ArHtfxZIfc4 o/FWIUIdxtTElcmjbWlPUDCyyKR6tMyoviCKvabZV/v9HK5a7zrZqMjw0p3nHjnN3w 4zb7jFPSByx5cem0sGHo6y2Jk2hE3kOqoj2HdC2Zn2bOr9PjbduZgwf4kp6YPA3R7C 5aFuSh9WocJO85woaHW5vSI8fz2DgrmTJwQM0lPD7FsT9kfnHlBFDXjwU2o2Vs0Wny qEFI8NSPXteGQ== 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 C1E25378000E; Wed, 10 Apr 2024 09:55:42 +0000 (UTC) Message-ID: <9c5aa4fb-a83c-470e-acf8-dd31303e50c2@collabora.com> Date: Wed, 10 Apr 2024 11:55:42 +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: Remove redundant code in lvts_ctrl_configure To: Pin-yen Lin , Daniel Lezcano , "Rafael J . Wysocki" , Zhang Rui , Lukasz Luba , Matthias Brugger , Nicolas Pitre Cc: linux-arm-kernel@lists.infradead.org, Alexandre Mergnat , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Minjie Du , linux-pm@vger.kernel.org, Frank Wunderlich , Balsam CHIHI References: <20240410000730.628043-1-treapking@chromium.org> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240410000730.628043-1-treapking@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 10/04/24 02:07, Pin-yen Lin ha scritto: > The removed variable assignment is never written to the register, so it > has no effect on the device behavior. Mediatek has confirmed that it > is not required to initialize this register for current platforms, so > remove this segment to avoid confusion. > > Signed-off-by: Pin-yen Lin > Added Nicolas Pitre to the loop; Nicolas, since you're pushing support for those, can you please check if CALSCALE is used/useful/necessary on MT8186/88 before I give a R-b to this commit? P.S.: Can anyone from MediaTek please confirm if the 0x300 value is right for this register? I'd still like Linux to properly initialize the registers, even if this could technically be a default value. > --- > > drivers/thermal/mediatek/lvts_thermal.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c > index fd4bd650c77a..48d2f8ba3f18 100644 > --- a/drivers/thermal/mediatek/lvts_thermal.c > +++ b/drivers/thermal/mediatek/lvts_thermal.c > @@ -985,12 +985,6 @@ static int lvts_ctrl_configure(struct device *dev, struct lvts_ctrl *lvts_ctrl) > value = LVTS_TSSEL_CONF; > writel(value, LVTS_TSSEL(lvts_ctrl->base)); > > - /* > - * LVTS_CALSCALE : ADC voltage round > - */ > - value = 0x300; > - value = LVTS_CALSCALE_CONF; As a side note, I believe that the original author wanted to write, instead... value = LVTS_CALSCALE_CONF; writel(value, LVTS_CALSCALE(lvts_ctrl->base); Cheers, Angelo > - > /* > * LVTS_MSRCTL0 : Sensor filtering strategy > *