Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2510651pxb; Mon, 18 Jan 2021 21:41:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFtS6VqFrEunOuvZCBKxx+s6yDwCbkaFhYjrhIVQbuBwwujk04DUiL2koqWnHLOaFMnqvJ X-Received: by 2002:a17:906:8046:: with SMTP id x6mr1941453ejw.351.1611034903958; Mon, 18 Jan 2021 21:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611034903; cv=none; d=google.com; s=arc-20160816; b=cZ/IlMh8TpKR0qox7ks3NvnNsxSQsAk6RdgrAVaTQRY0PzkliyhlS3Nn7VRDaloLdi c2BtIdlGk5vbjJ/p0leAjUJnxveVGpCEkPQ/ZWuHb2p3AJQhYx+M9J50ZVDzwWvUBV2I CHlpyOqSkbtJpG25eBKrG8mruWao8WvbtJ2tf39sn+ZxV3iozDPEgjyhb+nA18d8u5R9 BEp0/HrKT7pgSQ5BRblWmqzaEhVdAZxEGM9jsYn43FX/6zTz6nmGYBD1At4bOV8aRq/V BB0JThIkTz+qyBUu2pEinOF/We6yXddSoCg3EVwia8ZYRM4ipRaHEawVMX84NJXeEG0u kq/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=e8fKd6146RrWLck/lAWBCLKeZXrChHwcpj3S1o6p3lg=; b=WFeYTHBBsVozUrmFc8MMf6UrU6J/N6gXQwz0BIjhAtMPaoIurV/Qtacv6cEvhkZkUz P8tr7BF4ugGWuze34JsPX+cjQdGdjYXYR4wCkRcxtdFEFJrzPHLgHtaTx8evVwMBYToJ zzRf0A0Q6vzg7QN9ula5GFFocn5yIvo958mcCv08M3Wen6hyFxl6LRQOtmstPuevfh3S 8MRnnRaXSqjgxLG8ymSVsVxHbMx6NBf7McTFyzemejbiyOPfzk8f/rBXt99aOsrL4Wwz 6ddbF45RgoCkTgJ0SEF0q6hLRNuxqpxraoMWlPnpHRKcPj5B78vuROg/mYoVa45C+6QE ip4g== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bw17si7599293ejb.331.2021.01.18.21.41.19; Mon, 18 Jan 2021 21:41:43 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392326AbhASBiR convert rfc822-to-8bit (ORCPT + 99 others); Mon, 18 Jan 2021 20:38:17 -0500 Received: from mga17.intel.com ([192.55.52.151]:22878 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729202AbhASBiN (ORCPT ); Mon, 18 Jan 2021 20:38:13 -0500 IronPort-SDR: wlOK/UyGXgNp/srMc05MbBEkpaq2VK64eJgqznsoak1P2Lp+r42Ue504HQz/jrH6/G+MO5K+Xt pn8Qjjid72PA== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="158638312" X-IronPort-AV: E=Sophos;i="5.79,357,1602572400"; d="scan'208";a="158638312" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 17:37:29 -0800 IronPort-SDR: IMpdu4T63VIM+bChb5MYAewAOXgHALm0u+c7vuT9WUL14I53PJrMyd3+He/PiceT1Gl45+nd4p fGu69FRltqRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,357,1602572400"; d="scan'208";a="347022832" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga007.fm.intel.com with ESMTP; 18 Jan 2021 17:37:29 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 18 Jan 2021 17:37:28 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 19 Jan 2021 09:37:27 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Tue, 19 Jan 2021 09:37:27 +0800 From: "Zhang, Rui" To: Daniel Lezcano CC: Guenter Roeck , Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Neil Armstrong , Amit Kucheria , "open list:PWM FAN DRIVER" , open list , "open list:KHADAS MCU MFD DRIVER" , "open list:THERMAL" Subject: RE: [PATCH v2] thermal/core: Make cooling device state change private Thread-Topic: [PATCH v2] thermal/core: Make cooling device state change private Thread-Index: AQHW7cDP1uLeJF14xUSIfMisXKv/LaouK6iQ Date: Tue, 19 Jan 2021 01:37:27 +0000 Message-ID: <2514d8a204c04b4695da7b73bd2ff848@intel.com> References: <20210118173824.9970-1-daniel.lezcano@linaro.org> In-Reply-To: <20210118173824.9970-1-daniel.lezcano@linaro.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Daniel Lezcano > Sent: Tuesday, January 19, 2021 1:38 AM > To: daniel.lezcano@linaro.org; Zhang, Rui > Cc: Guenter Roeck ; Kamil Debski ; > Bartlomiej Zolnierkiewicz ; Jean Delvare > ; Neil Armstrong ; Amit > Kucheria ; open list:PWM FAN DRIVER hwmon@vger.kernel.org>; open list ; open > list:KHADAS MCU MFD DRIVER ; open > list:THERMAL > Subject: [PATCH v2] thermal/core: Make cooling device state change private > Importance: High > > 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 > Acked-by: Guenter Roeck Acked-by: Zhang Rui Thanks, rui > --- > drivers/hwmon/pwm-fan.c | 1 - > drivers/thermal/khadas_mcu_fan.c | 1 - > drivers/thermal/thermal_core.h | 2 ++ > include/linux/thermal.h | 3 --- > 4 files changed, 2 insertions(+), 5 deletions(-) > > 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/khadas_mcu_fan.c > b/drivers/thermal/khadas_mcu_fan.c > index 9eadd2d6413e..d35e5313bea4 100644 > --- a/drivers/thermal/khadas_mcu_fan.c > +++ b/drivers/thermal/khadas_mcu_fan.c > @@ -100,7 +100,6 @@ static int khadas_mcu_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) > { } > -- > 2.17.1