From patchwork Mon Jan 11 14:13:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 360474 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp2544526ejs; Mon, 11 Jan 2021 06:15:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzuYeqdF9YShoIJItaVAE9nSK2mA8qih71g0lFe8zmWRrqxD2r1ocPUjYQDKSAqMGIIuAFR X-Received: by 2002:a17:906:26ca:: with SMTP id u10mr11009233ejc.165.1610374548878; Mon, 11 Jan 2021 06:15:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610374548; cv=none; d=google.com; s=arc-20160816; b=O91bX0R3O0BKLklkTY9C6vz4tnwD2tJio6IwEsCp6/HNZTOg1KjDhmxmMsZT5WlZkD t44Ua2pAvymQwjzz9Z4zpikQAnuF2txKLJcEN+l20uL5wQua3MFoev0o3mu5HqJkfu3P TQFcSOcsMFnxW8qwu9xva9RBXJ8K/NUvek9H0fIy15m9kHlNtkdA4ZZbFR7iftsDAVot paMInNUnLLKgbrukZjTTgwFFXoIbOeAfGqi5wbWH4/sJMDxsDGu+RUrby192gpIpR1GQ T9BYLeojG4Um1ItgGpzuUq5mrEKBDfAKvzciXIjblhLhkJWGiffO7Bgixt1dAxuTAsIm d36w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=HDQz4iMlNtJUgLbZfKWh3c6UGq9q4CpkzN2dgTPuBqE=; b=s+eM+piaCqFpsu71CnOh2AiGJZjgL6zlG3iGPheQ0cDGFFxUtRhQbMTLOPfJRDaJ/7 lrI0Zk3KhiUy7vTS6IdkUg5dVdDcsJYMD/nwJF7UOFtOuxHVxjt8OFzChqmgQY/kI6ul sEGrs0Cxoe32aReOh0dS9vpQ+AKtuc05JYoevA+hSpuZzSD6eHYKT5+A6MDtDQatBpMg m7Loi68dVvShzgNQgN1UYSW2cQONfEhhFw1WaekzknUbhnT23AWcs97eg6e/EhuNJs77 MY4oeZgxNw31dYW5t7jPnvJV00n4uoQnUkSeR7jOD63TdPRBSmxTr9qUoi9RrmDF7DS4 Ha+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aTCCFtxn; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd18si4946846ejc.712.2021.01.11.06.15.48; Mon, 11 Jan 2021 06:15:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aTCCFtxn; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729926AbhAKOOe (ORCPT + 7 others); Mon, 11 Jan 2021 09:14:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727729AbhAKOOd (ORCPT ); Mon, 11 Jan 2021 09:14:33 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FFEBC061795 for ; Mon, 11 Jan 2021 06:13:53 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id q75so15248166wme.2 for ; Mon, 11 Jan 2021 06:13:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HDQz4iMlNtJUgLbZfKWh3c6UGq9q4CpkzN2dgTPuBqE=; b=aTCCFtxnRgly36Ux3D+jAWhsNi3Aj+9GAa7C15lOfMsBm1JS/and3I/F97ePyFunQD hchCfukPVLzNWQFV8IcW3G1tfW5kF9gnl6+NuLiQv5B67Rck8wjngMzh+aOYOdr+tk/I RKg4h10awXZjb2nk4FwYWiDsW/dn9wUVcXQ8aMku/JAs5Vunxt9JX5ULNbUfcq6IyjDC 0/zD+HeegdWtlTOWHoHaZuLKztzP2pDlNKroCqx3Cs/lOqPYjjoYOcw8dQazH431tZYH t/9vqkJ6N+TFPISx2B9YWzgLu9iSPO5EFaU9Z4RnCVxxJ2/oqSEhAaWXMwYN5KgB7HfV P3QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HDQz4iMlNtJUgLbZfKWh3c6UGq9q4CpkzN2dgTPuBqE=; b=pIsLG+T5m4sQ0E0+MpdLfihTv1E4AXqeIHNnGn5N6BR1q5NI39GfLfiS+Hrtyu0ven d/cpXvpBtQpnHpWTcJSgcr7j0bUVqy6RAJ49lmE88NLW9pO9rYIcdEUK2H417N+SICQ/ psZwxpZy3ZPAeEcIZ7zeYxb9r555xzJDLlzvSEScFbjZgXp4FR/C5CPJWjDK5hkSQm7d r6Ay+ideX7sEauxoNczUCdW9Fz1aCh3XhcUos7SrKi7TI2fnTIiTVGuB6poT2pv37yZP KKLownApPmif1ZuOJx5LrunD1/cZKjoFznZFoUytmDVSJHKOQPyk/2JJNfBB45+LKAil GLew== X-Gm-Message-State: AOAM531piVownIC42j/D/b7WiE4tRZu8BQWCwAw6b+oxR8ukyt5qyDUr 34mnAy5PzmHheFx1ScY6kxyBPA== X-Received: by 2002:a1c:bb06:: with SMTP id l6mr15224113wmf.112.1610374431483; Mon, 11 Jan 2021 06:13:51 -0800 (PST) Received: from localhost.localdomain (lns-bzn-59-82-252-152-224.adsl.proxad.net. [82.252.152.224]) by smtp.gmail.com with ESMTPSA id c4sm22367583wmf.19.2021.01.11.06.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 06:13:50 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com Cc: Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Guenter Roeck , Amit Kucheria , linux-hwmon@vger.kernel.org (open list:PWM FAN DRIVER), linux-kernel@vger.kernel.org (open list), linux-pm@vger.kernel.org (open list:THERMAL) Subject: [PATCH] thermal/core: Make cooling device state change private Date: Mon, 11 Jan 2021 15:13:20 +0100 Message-Id: <20210111141320.15452-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The change of the cooling device state should be used by the governor or at least by the core code, not by the drivers themselves. Remove the API usage and move the function declaration to the internal headers. Signed-off-by: Daniel Lezcano --- drivers/hwmon/pwm-fan.c | 1 - drivers/thermal/thermal_core.h | 2 ++ include/linux/thermal.h | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) -- 2.17.1 Acked-by: Guenter Roeck Reported-by: kernel test robot diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index bdba2143021a..0b1159ceac9b 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -378,7 +378,6 @@ static int pwm_fan_probe(struct platform_device *pdev) return ret; } ctx->cdev = cdev; - thermal_cdev_update(cdev); } return 0; diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 90f9a80c8b23..86b8cef7310e 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -65,6 +65,8 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) cdev->ops->power2state; } +void thermal_cdev_update(struct thermal_cooling_device *); + /** * struct thermal_trip - representation of a point in temperature domain * @np: pointer to struct device_node that this trip point was created from diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 1e686404951b..6ac7bb1d2b1f 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -390,7 +390,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); int thermal_zone_get_slope(struct thermal_zone_device *tz); int thermal_zone_get_offset(struct thermal_zone_device *tz); -void thermal_cdev_update(struct thermal_cooling_device *); void thermal_notify_framework(struct thermal_zone_device *, int); int thermal_zone_device_enable(struct thermal_zone_device *tz); int thermal_zone_device_disable(struct thermal_zone_device *tz); @@ -437,8 +436,6 @@ static inline int thermal_zone_get_offset( struct thermal_zone_device *tz) { return -ENODEV; } -static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) -{ } static inline void thermal_notify_framework(struct thermal_zone_device *tz, int trip) { }