Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3269924pxu; Sun, 29 Nov 2020 21:40:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7XeFK1qWA+FtsdZw4TixAnjHiu7gtHrYCC8pt0QPqRpnmfpn7v5gCtFn7o/0OM5jHwWq2 X-Received: by 2002:a17:907:6e6:: with SMTP id yh6mr5370049ejb.512.1606714847798; Sun, 29 Nov 2020 21:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606714847; cv=none; d=google.com; s=arc-20160816; b=W1m36UAfp8QdxLm/10NCJPd+bDbn3ZCP2MnQHCtfMT9BfWlh0n6UXWpqQJJcukSOfw gfIJuF8Gt6MBMuhIxKHcwacUpesQSVZHgwy9lNrkTTMajkVxYvKuGIbwBJe8iU4Ioeos YVTSpnUaO3DgVjmxWdlHDFBGdDKVR0HAkezl13GusRhZErFXBFllZpmY61C+5OE1SSJ2 Z+mrr5IBilqEPH7wOkKIo1Q2eIM3yQF+ndfIPD2Htvhcn1FXUS2gz9uwnQQ1ETc3V/A7 C1t+d6ni7LOQjMBG9jddcUBjQnq09Yj+YD3Q+kdjCIms/SfgBLNksAnCYxwHLUUsvkxT OVTw== 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=BOOVOhIBjrHeFGMEQ5m8ZjuMRovuBMBpeex7jFdfa5g=; b=NaUst7q6u6MedHi+g14YEFIpUl4P6Al6zTKvItYK2ZKz116AY6CpKLj6lXZg+ZIRe8 DumRaFkTLJzU2nvux6MlTy1n3ETKDyLlbRRJtxzGzaiXIUornLj8FoINNcta2lT30eXP H4YJoJ4e8FHn8p1Mk2RHwwQLDZhQacjb+4FXWISO5/oW3ev4luSXKJvBqb5bAnZR0nFX RCUhlaGL95QJBJ/lYYGJHpM/WTKfSNPwJQty5XEh7B+rEC04YfTXCvXy5UnMpCrlyn1e LJAVtqS6Hqyt6PghS9g2QeqS/0200VLSMeD/8pYZ90Z3ydW1hhdqwnlpVamh3NnCqPOy f3Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oh19si2466258ejb.553.2020.11.29.21.40.25; Sun, 29 Nov 2020 21:40:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726260AbgK3Fhn (ORCPT + 99 others); Mon, 30 Nov 2020 00:37:43 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:58786 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgK3Fhn (ORCPT ); Mon, 30 Nov 2020 00:37:43 -0500 Received: from 220-133-187-190.hinet-ip.hinet.net ([220.133.187.190] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kjbrn-0002y4-5l; Mon, 30 Nov 2020 05:36:52 +0000 From: Kai-Heng Feng To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org Cc: andrzej.p@collabora.com, mjg59@google.com, srinivas.pandruvada@linux.intel.com, Kai-Heng Feng , Bartlomiej Zolnierkiewicz , Peter Kaestle , Gayatri Kammela , Takashi Iwai , Andrew Morton , Andy Shevchenko , Akinobu Mita , linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] thermal: int340x: Indicate userspace usage Date: Mon, 30 Nov 2020 13:36:39 +0800 Message-Id: <20201130053640.54608-2-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201130053640.54608-1-kai.heng.feng@canonical.com> References: <20201130053640.54608-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The device isn't present under ACPI ThermalZone, and there's a dedicated userspace daemon for this thermal device. Let thermal core know it shouldn't handle trips to avoid surprising thermal shutdown. Signed-off-by: Kai-Heng Feng --- drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 1 + .../thermal/intel/int340x_thermal/int340x_thermal_zone.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 0966551cbaaa..2002bc96eb3c 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -439,6 +439,7 @@ static struct thermal_zone_device_ops int3400_thermal_ops = { static struct thermal_zone_params int3400_thermal_params = { .governor_name = "user_space", .no_hwmon = true, + .userspace = true, }; static void int3400_setup_gddv(struct int3400_thermal_priv *priv) diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 6e479deff76b..a103eb42ef2d 100644 --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -208,6 +208,7 @@ EXPORT_SYMBOL_GPL(int340x_thermal_read_trips); static struct thermal_zone_params int340x_thermal_params = { .governor_name = "user_space", .no_hwmon = true, + .userspace = true, }; struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev, @@ -259,14 +260,9 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev, ret = PTR_ERR(int34x_thermal_zone->zone); goto err_thermal_zone; } - ret = thermal_zone_device_enable(int34x_thermal_zone->zone); - if (ret) - goto err_enable; return int34x_thermal_zone; -err_enable: - thermal_zone_device_unregister(int34x_thermal_zone->zone); err_thermal_zone: acpi_lpat_free_conversion_table(int34x_thermal_zone->lpat_table); kfree(int34x_thermal_zone->aux_trips); -- 2.29.2