Commit bceb5646 authored by Daniel Lezcano's avatar Daniel Lezcano

thermal: core: Make thermal_zone_set_trips private

The function thermal_zone_set_trips() is used by the thermal core code
in order to update the next trip points, there are no other users.

Move the function definition in the thermal_core.h, remove the
EXPORT_SYMBOL_GPL and document the function.
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Reviewed-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Link: https://lore.kernel.org/r/20200331165449.30355-1-daniel.lezcano@linaro.org
parent d2bc4dd9
...@@ -69,6 +69,9 @@ void thermal_zone_device_unbind_exception(struct thermal_zone_device *, ...@@ -69,6 +69,9 @@ void thermal_zone_device_unbind_exception(struct thermal_zone_device *,
int thermal_zone_device_set_policy(struct thermal_zone_device *, char *); int thermal_zone_device_set_policy(struct thermal_zone_device *, char *);
int thermal_build_list_of_policies(char *buf); int thermal_build_list_of_policies(char *buf);
/* Helpers */
void thermal_zone_set_trips(struct thermal_zone_device *tz);
/* sysfs I/F */ /* sysfs I/F */
int thermal_zone_create_device_groups(struct thermal_zone_device *, int); int thermal_zone_create_device_groups(struct thermal_zone_device *, int);
void thermal_zone_destroy_device_groups(struct thermal_zone_device *); void thermal_zone_destroy_device_groups(struct thermal_zone_device *);
......
...@@ -113,6 +113,18 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) ...@@ -113,6 +113,18 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
} }
EXPORT_SYMBOL_GPL(thermal_zone_get_temp); EXPORT_SYMBOL_GPL(thermal_zone_get_temp);
/**
* thermal_zone_set_trips - Computes the next trip points for the driver
* @tz: a pointer to a thermal zone device structure
*
* The function computes the next temperature boundaries by browsing
* the trip points. The result is the closer low and high trip points
* to the current temperature. These values are passed to the backend
* driver to let it set its own notification mechanism (usually an
* interrupt).
*
* It does not return a value
*/
void thermal_zone_set_trips(struct thermal_zone_device *tz) void thermal_zone_set_trips(struct thermal_zone_device *tz)
{ {
int low = -INT_MAX; int low = -INT_MAX;
...@@ -161,7 +173,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz) ...@@ -161,7 +173,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz)
exit: exit:
mutex_unlock(&tz->lock); mutex_unlock(&tz->lock);
} }
EXPORT_SYMBOL_GPL(thermal_zone_set_trips);
void thermal_cdev_update(struct thermal_cooling_device *cdev) void thermal_cdev_update(struct thermal_cooling_device *cdev)
{ {
......
...@@ -439,7 +439,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, ...@@ -439,7 +439,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *); struct thermal_cooling_device *);
void thermal_zone_device_update(struct thermal_zone_device *, void thermal_zone_device_update(struct thermal_zone_device *,
enum thermal_notify_event); enum thermal_notify_event);
void thermal_zone_set_trips(struct thermal_zone_device *);
struct thermal_cooling_device *thermal_cooling_device_register(const char *, struct thermal_cooling_device *thermal_cooling_device_register(const char *,
void *, const struct thermal_cooling_device_ops *); void *, const struct thermal_cooling_device_ops *);
...@@ -497,8 +496,6 @@ static inline int thermal_zone_unbind_cooling_device( ...@@ -497,8 +496,6 @@ static inline int thermal_zone_unbind_cooling_device(
static inline void thermal_zone_device_update(struct thermal_zone_device *tz, static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
enum thermal_notify_event event) enum thermal_notify_event event)
{ } { }
static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)
{ }
static inline struct thermal_cooling_device * static inline struct thermal_cooling_device *
thermal_cooling_device_register(char *type, void *devdata, thermal_cooling_device_register(char *type, void *devdata,
const struct thermal_cooling_device_ops *ops) const struct thermal_cooling_device_ops *ops)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment