Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1076810rdb; Wed, 6 Dec 2023 08:02:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiTJoJsO7cjZrpK8MNXp2qhDbFN3xsjOQEr/BKHBm4rEyqqNfNRcql2s5M7MT4RHwnMNri X-Received: by 2002:a05:6a20:2a08:b0:18f:e0f1:5546 with SMTP id e8-20020a056a202a0800b0018fe0f15546mr1223411pzh.47.1701878533778; Wed, 06 Dec 2023 08:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701878533; cv=none; d=google.com; s=arc-20160816; b=hqMCvbb9XPlHEzWnCigcnP8yChCxZE0YdQwIezEsi6abW2jauOgMMmAsdWzYPG9MDP QSgWY4UAnNQMOcgAmg11vN9RXSdFmEYA/jfwY9PKf5kNBjVkeEsNysqOePrUsV6vY4qP eFtd86A+kUubmHvOvTxMwLWntFJZQROXl8LWAhD7/cv1S5Nw7hFSRKHFgAWQVcesBsDz nyY7tUkvs4qN5r7P3UhidQPBcLHX6xdKG51LaPJcIoM4o1RBh/OVSwIbN2iPokAYqNzT rt4U1cZ+mupjzEbvf6kfPT7urMZZpuh/8cdJY40VOizHkJEQKdjAvMsL9W0ekMDYUVOS WbgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=6FmJW74vpqRXKeXxx8UpRyC9OYDkopJJC1gQHrDqnjA=; fh=uDfSeyQcicFPe9yKG3eLk/KL9G6+nqtKqMbn80XCcZM=; b=ECyo7sX5Aw4CJV8pv9hdOx2TeuaL/QTypoObjeoZ8J4D4AatZwtE4D8p/uC2SAa02x C1ks3eA1oJ970c8fqVs/snv5g5/NnCIfTULcTwSuWYLA/myK6xg3Qhyd2ihg73lTS6nR S/RussElWUf0Adjo5fH75GvAUBceSb5NzgF2iteI1DGQgCX60UwSRHnBx1bxK/+NLUcq A3hUy2s3vhjKCQv+HJ8MnPzzI+Oayn6D6376M/ozo0w3Gjp5yIAhyB/jkT7ZTJcRjBik XU3G4YXVA6HNVp+gEwMqCnw2Kydug6XV+LjDCaZL4TtNj+Xs4DZdmAPDaiYKe6oKK6hh zvCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u10-20020a63140a000000b005a9c40151b3si91519pgl.804.2023.12.06.08.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 08:02:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4F69F80BE095; Wed, 6 Dec 2023 08:02:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379498AbjLFQBz convert rfc822-to-8bit (ORCPT + 99 others); Wed, 6 Dec 2023 11:01:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379484AbjLFQBx (ORCPT ); Wed, 6 Dec 2023 11:01:53 -0500 Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD41A10E6; Wed, 6 Dec 2023 08:01:51 -0800 (PST) Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-58e255472daso590164eaf.0; Wed, 06 Dec 2023 08:01:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701878511; x=1702483311; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vEEyO8kikl4P6RL0mPnSeAdcpM6MtvSyVyxaRRF7VNY=; b=VQzPEcqwMuA+CeKWUe9yDY8z4PFOaCvBrkDWl4AfhvHQbkcQ59EE2BrjS3Y95Kj0wx SIDZax4xCbgvv3Zw59QVsk6eTcWuckzQ5sKph4SxqZoGvonnwMt39a8yyqkG7tBk/nG/ vRXKzpcYXVOVFVa3hlzNU4e66d+aNXX/vIgiRSF2lBdekNXrCN4g24xkM7YHRCZdNn14 6Jan8FgyV1LVseUL4Gj8bbGSNq7bber+/RyYSQcT2WdqVhq/zxTJhuOmK290XqE3BeUd IJPgG3M/OhH8uc9J+46FesI87B5ojy73dsOZbCXOWYhMFrY+CY51INBl6wBoYIpDEgi4 ktRQ== X-Gm-Message-State: AOJu0YyLPY9Py3rplwqzxXiygZyb94JV81CFWtf5VVS/PRXBF2Dr61F+ Inp3qeeBehjXt0J7E0N3zM13dS6IMKWFZVENDe8= X-Received: by 2002:a05:6870:40c9:b0:1e9:8ab9:11ca with SMTP id l9-20020a05687040c900b001e98ab911camr2028604oal.3.1701878510776; Wed, 06 Dec 2023 08:01:50 -0800 (PST) MIME-Version: 1.0 References: <5737811.DvuYhMxLoT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 6 Dec 2023 17:01:37 +0100 Message-ID: Subject: Re: [PATCH v1] thermal: trip: Send trip change notifications on all trip updates To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Linux PM , Srinivas Pandruvada , Zhang Rui , Linux ACPI , LKML , Lukasz Luba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 08:02:09 -0800 (PST) Hi Daniel, On Wed, Dec 6, 2023 at 3:38 PM Daniel Lezcano wrote: > > > Hi Rafael, > > On 05/12/2023 20:18, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > The _store callbacks of the trip point temperature and hysteresis sysfs > > attributes invoke thermal_notify_tz_trip_change() to send a notification > > regarding the trip point change, but when trip points are updated by the > > platform firmware, trip point change notifications are not sent. > > > > To make the behavior after a trip point change more consistent, > > modify all of the 3 places where trip point temperature is updated > > to use a new function called thermal_zone_set_trip_temp() for this > > purpose and make that function call thermal_notify_tz_trip_change(). > > > > Note that trip point hysteresis can only be updated via sysfs and > > trip_point_hyst_store() calls thermal_notify_tz_trip_change() already, > > so this code path need not be changed. > > Why the ACPI driver is not calling thermal_zone_device_update() after > changing the trip point like the other drivers? It calls that function, but because it may update multiple trips in one go, it does that after all of the updates are done, via acpi_thermal_check_fn(). > It would make sense to have the thermal framework to be notified about > this change and check if there is a trip violation, no ? It is notified as noted above, but not synchronously.