From patchwork Tue Jan 24 19:18:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 47839 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2331742wrn; Tue, 24 Jan 2023 11:22:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXtoX54YxR5aKR3LwIFwCn07qWNf3n93ZNoUhy5BTv1SMtriGViwv/oEUHxlUzKOD7DpbBp6 X-Received: by 2002:a17:902:c943:b0:195:e834:31e8 with SMTP id i3-20020a170902c94300b00195e83431e8mr20988994pla.10.1674588131601; Tue, 24 Jan 2023 11:22:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674588131; cv=none; d=google.com; s=arc-20160816; b=lNnWvzFrbSVIwRToubqvrefn2012/Vm7Jp9GYixwkWEygKKmDpyS0sTWCQ2B+iPXMo LD6RLeEjq5/JMvsuMc3WWf1BWN3AzcQqjFo3+CNzTg/SyjDXXajDpoY9Uyc7Rx4WPcMr jLTSz0MsEI1kFI8VfcHnHfvz731wXvGhwnkl6T4zRknqspzFM8wcmXvO8Qz4PdZ/38Wp /jZFQ01fyk2Lk9lAICnL+lPS3CoQc2qkwjr5531jZ5jLk4aDGcNVJ/ItITnRHyJ3bZ01 Fafy6y+1Xj8PZp8os+zAFpl7ICU3gviAquBtUufFNboqphWmIVJZFHLXxm3YOs9VEPMv YKkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GbqI5x7Qd23KASVXNMexBDwHCFKOGLzor+NZPFZxlL8=; b=OBhxIKgQckdR9LdxZoo3OXDRe2RpHq1RRtQyyuLBj7AOK5jGYnPR+FvrGChp6S9PW3 k4axUTYHr4v5Q8mj6l07QcPF5O0MhshhvRYObP5dp2USqhMh66NGONoTYOV+EmtpOvPa 4rrEiD9Lu/7dDCfR82wXjq7LDIoQDrfYc4ITFNK7EnEer+59ZRoMKnkv4GLDBXL2PhQS ixMjhQv3yPXGnuq9VX2jQP3MLPxmB5V6xVj7hR/OVeVJd+rxCqwfT34vifHvQYy6KV3I Kw/29AEzU6lBeyGZwCeAwsj3taXMvTPj1jB2J4ULjenO3ppzxPjO9+cgPr42g2NIqOPs aQGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a170902f7ca00b00189891763f3si3132245plw.600.2023.01.24.11.21.59; Tue, 24 Jan 2023 11:22:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234433AbjAXTTM (ORCPT + 99 others); Tue, 24 Jan 2023 14:19:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234343AbjAXTTK (ORCPT ); Tue, 24 Jan 2023 14:19:10 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05FA531E3B; Tue, 24 Jan 2023 11:19:08 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 86a9f70f4c250077; Tue, 24 Jan 2023 20:19:07 +0100 Received: from kreacher.localnet (unknown [213.134.189.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id A76BB7A644A; Tue, 24 Jan 2023 20:19:06 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Linux ACPI , Zhang Rui , Srinivas Pandruvada , Daniel Lezcano Subject: [PATCH v1 5/6] thermal: intel: int340x: Populate auxiliary trip points first Date: Tue, 24 Jan 2023 20:18:09 +0100 Message-ID: <10235439.nUPlyArG6x@kreacher> In-Reply-To: <12159228.O9o76ZdvQC@kreacher> References: <12159228.O9o76ZdvQC@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.189.30 X-CLIENT-HOSTNAME: 213.134.189.30 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedruddvtddguddvudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepvddufedrudefgedrudekledrfedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekledrfedtpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthho pehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755932924464200757?= X-GMAIL-MSGID: =?utf-8?q?1755932924464200757?= From: Rafael J. Wysocki Populate the auxiliary trip points in the int340x thermal zone before the "regular" ACPI ones, because they occupy the initial entries of the trip points table. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c =================================================================== --- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -142,6 +142,11 @@ struct int34x_thermal_zone *int340x_ther goto err_trips_alloc; } + for (i = 0; i < int34x_zone->aux_trip_nr; i++) { + int34x_zone->trips[i].type = THERMAL_TRIP_PASSIVE; + int34x_zone->trips[i].temperature = THERMAL_TEMP_INVALID; + } + trip_cnt = int340x_thermal_read_trips(int34x_zone); status = acpi_evaluate_integer(adev->handle, "GTSH", NULL, &hyst); @@ -153,11 +158,6 @@ struct int34x_thermal_zone *int340x_ther for (i = 0; i < trip_cnt; ++i) int34x_zone->trips[i].hysteresis = hyst; - for (i = 0; i < int34x_zone->aux_trip_nr; i++) { - int34x_zone->trips[i].type = THERMAL_TRIP_PASSIVE; - int34x_zone->trips[i].temperature = THERMAL_TEMP_INVALID; - } - int34x_zone->lpat_table = acpi_lpat_get_conversion_table(adev->handle); int34x_zone->zone = thermal_zone_device_register_with_trips(