From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
eduardo <eduardo.valentin@ti.com>
Subject: Re: [PATCH] Thermal: thermal API cleanup
Date: Wed, 17 Apr 2013 13:13:10 -0400 [thread overview]
Message-ID: <516ED826.1050303@ti.com> (raw)
In-Reply-To: <1366211920.2091.55.camel@rzhang1-mobl4>
Rui,
On 17-04-2013 11:18, Zhang Rui wrote:
>>From d6db6ba9831d07338e11d4821febec4ef3cdf8f6 Mon Sep 17 00:00:00 2001
> From: Zhang Rui <rui.zhang@intel.com>
> Date: Wed, 17 Apr 2013 23:12:40 +0800
> Subject: [PATCH] Thermal: thermal API cleanup
>
> We build all the thermal governors into thermal module,
> thus a couple of APIs should be cleaned up as they are used
> by thermal governors only.
>
> Cleanup for get_tz_trend(), get_thermal_instance(),
> and thermal_cdev_update(), in this patch.
>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
> Documentation/thermal/sysfs-api.txt | 19 +------------------
> drivers/thermal/thermal_core.c | 3 ---
> drivers/thermal/thermal_core.h | 5 +++++
> include/linux/thermal.h | 4 ----
> 4 files changed, 6 insertions(+), 25 deletions(-)
>
> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
> index b2ffe98..4dcc4c7 100644
> --- a/Documentation/thermal/sysfs-api.txt
> +++ b/Documentation/thermal/sysfs-api.txt
> @@ -355,27 +355,10 @@ crosses any of the configured thresholds.
>
> 5. Export Symbol APIs:
>
> -5.1: get_tz_trend:
> -This function returns the trend of a thermal zone, i.e the rate of change
> -of temperature of the thermal zone. Ideally, the thermal sensor drivers
> -are supposed to implement the callback. If they don't, the thermal
> -framework calculated the trend by comparing the previous and the current
> -temperature values.
> -
> -5.2:get_thermal_instance:
> -This function returns the thermal_instance corresponding to a given
> -{thermal_zone, cooling_device, trip_point} combination. Returns NULL
> -if such an instance does not exist.
> -
> -5.3:notify_thermal_framework:
> +5.1:notify_thermal_framework:
> This function handles the trip events from sensor drivers. It starts
> throttling the cooling devices according to the policy configured.
> For CRITICAL and HOT trip points, this notifies the respective drivers,
> and does actual throttling for other trip points i.e ACTIVE and PASSIVE.
> The throttling policy is based on the configured platform data; if no
> platform data is provided, this uses the step_wise throttling policy.
> -
> -5.4:thermal_cdev_update:
> -This function serves as an arbitrator to set the state of a cooling
> -device. It sets the cooling device to the deepest cooling state if
> -possible.
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 4cdc3e3..ac380fc 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -166,7 +166,6 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
>
> return trend;
> }
> -EXPORT_SYMBOL(get_tz_trend);
>
> struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
> struct thermal_cooling_device *cdev, int trip)
> @@ -189,7 +188,6 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
>
> return target_instance;
> }
> -EXPORT_SYMBOL(get_thermal_instance);
>
> static void print_bind_err_msg(struct thermal_zone_device *tz,
> struct thermal_cooling_device *cdev, int ret)
> @@ -1415,7 +1413,6 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
> cdev->ops->set_cur_state(cdev, target);
> cdev->updated = true;
> }
> -EXPORT_SYMBOL(thermal_cdev_update);
>
> /**
> * notify_thermal_framework - Sensor drivers use this API to notify framework
> diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
> index 7cf2f66..0bb98d2 100644
> --- a/drivers/thermal/thermal_core.h
> +++ b/drivers/thermal/thermal_core.h
> @@ -50,6 +50,11 @@ struct thermal_instance {
> struct list_head cdev_node; /* node in cdev->thermal_instances */
> };
>
> +int get_tz_trend(struct thermal_zone_device *, int);
> +struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
> + struct thermal_cooling_device *, int);
> +void thermal_cdev_update(struct thermal_cooling_device *);
> +
> int thermal_register_governor(struct thermal_governor *);
> void thermal_unregister_governor(struct thermal_governor *);
>
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 4445b95..097e674 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -240,10 +240,6 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
> const struct thermal_cooling_device_ops *);
> void thermal_cooling_device_unregister(struct thermal_cooling_device *);
>
> -int get_tz_trend(struct thermal_zone_device *, int);
> -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
> - struct thermal_cooling_device *, int);
> -void thermal_cdev_update(struct thermal_cooling_device *);
> void notify_thermal_framework(struct thermal_zone_device *, int);
>
> #ifdef CONFIG_NET
>
prev parent reply other threads:[~2013-04-17 17:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 15:18 [PATCH] Thermal: thermal API cleanup Zhang Rui
2013-04-17 16:17 ` R, Durgadoss
2013-04-17 17:13 ` Eduardo Valentin [this message]
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=516ED826.1050303@ti.com \
--to=eduardo.valentin@ti.com \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.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.