From: "Zhang, Rui" <rui.zhang@intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "open list:PWM FAN DRIVER" <linux-hwmon@vger.kernel.org>,
Jean Delvare <jdelvare@suse.com>,
Neil Armstrong <narmstrong@baylibre.com>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
Amit Kucheria <amitk@kernel.org>, Kamil Debski <kamil@wypas.org>,
open list <linux-kernel@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
"open list:KHADAS MCU MFD DRIVER"
<linux-amlogic@lists.infradead.org>,
Guenter Roeck <linux@roeck-us.net>
Subject: RE: [PATCH v2] thermal/core: Make cooling device state change private
Date: Tue, 19 Jan 2021 01:37:27 +0000 [thread overview]
Message-ID: <2514d8a204c04b4695da7b73bd2ff848@intel.com> (raw)
In-Reply-To: <20210118173824.9970-1-daniel.lezcano@linaro.org>
> -----Original Message-----
> From: Daniel Lezcano <daniel.lezcano@linaro.org>
> Sent: Tuesday, January 19, 2021 1:38 AM
> To: daniel.lezcano@linaro.org; Zhang, Rui <rui.zhang@intel.com>
> Cc: Guenter Roeck <linux@roeck-us.net>; Kamil Debski <kamil@wypas.org>;
> Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>; Jean Delvare
> <jdelvare@suse.com>; Neil Armstrong <narmstrong@baylibre.com>; Amit
> Kucheria <amitk@kernel.org>; open list:PWM FAN DRIVER <linux-
> hwmon@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>; open
> list:KHADAS MCU MFD DRIVER <linux-amlogic@lists.infradead.org>; open
> list:THERMAL <linux-pm@vger.kernel.org>
> 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 <daniel.lezcano@linaro.org>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Zhang Rui <rui.zhang@intel.com>
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
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: "Zhang, Rui" <rui.zhang@intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
Kamil Debski <kamil@wypas.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Jean Delvare <jdelvare@suse.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Amit Kucheria <amitk@kernel.org>,
"open list:PWM FAN DRIVER" <linux-hwmon@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:KHADAS MCU MFD DRIVER"
<linux-amlogic@lists.infradead.org>,
"open list:THERMAL" <linux-pm@vger.kernel.org>
Subject: RE: [PATCH v2] thermal/core: Make cooling device state change private
Date: Tue, 19 Jan 2021 01:37:27 +0000 [thread overview]
Message-ID: <2514d8a204c04b4695da7b73bd2ff848@intel.com> (raw)
In-Reply-To: <20210118173824.9970-1-daniel.lezcano@linaro.org>
> -----Original Message-----
> From: Daniel Lezcano <daniel.lezcano@linaro.org>
> Sent: Tuesday, January 19, 2021 1:38 AM
> To: daniel.lezcano@linaro.org; Zhang, Rui <rui.zhang@intel.com>
> Cc: Guenter Roeck <linux@roeck-us.net>; Kamil Debski <kamil@wypas.org>;
> Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>; Jean Delvare
> <jdelvare@suse.com>; Neil Armstrong <narmstrong@baylibre.com>; Amit
> Kucheria <amitk@kernel.org>; open list:PWM FAN DRIVER <linux-
> hwmon@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>; open
> list:KHADAS MCU MFD DRIVER <linux-amlogic@lists.infradead.org>; open
> list:THERMAL <linux-pm@vger.kernel.org>
> 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 <daniel.lezcano@linaro.org>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Zhang Rui <rui.zhang@intel.com>
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
next prev parent reply other threads:[~2021-01-19 1:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 17:38 [PATCH v2] thermal/core: Make cooling device state change private Daniel Lezcano
2021-01-18 17:38 ` Daniel Lezcano
2021-01-19 1:37 ` Zhang, Rui [this message]
2021-01-19 1:37 ` Zhang, Rui
2021-02-04 7:40 ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2514d8a204c04b4695da7b73bd2ff848@intel.com \
--to=rui.zhang@intel.com \
--cc=amitk@kernel.org \
--cc=b.zolnierkie@samsung.com \
--cc=daniel.lezcano@linaro.org \
--cc=jdelvare@suse.com \
--cc=kamil@wypas.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=narmstrong@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.