diff options
| -rw-r--r-- | drivers/thermal/of-thermal.c | 21 | ||||
| -rw-r--r-- | include/linux/thermal.h | 15 |
2 files changed, 18 insertions, 18 deletions
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 87b9cfe28eb8..d3ac117e2ddd 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c | |||
| @@ -37,21 +37,6 @@ | |||
| 37 | /*** Private data structures to represent thermal device tree data ***/ | 37 | /*** Private data structures to represent thermal device tree data ***/ |
| 38 | 38 | ||
| 39 | /** | 39 | /** |
| 40 | * struct __thermal_trip - representation of a point in temperature domain | ||
| 41 | * @np: pointer to struct device_node that this trip point was created from | ||
| 42 | * @temperature: temperature value in miliCelsius | ||
| 43 | * @hysteresis: relative hysteresis in miliCelsius | ||
| 44 | * @type: trip point type | ||
| 45 | */ | ||
| 46 | |||
| 47 | struct __thermal_trip { | ||
| 48 | struct device_node *np; | ||
| 49 | unsigned long int temperature; | ||
| 50 | unsigned long int hysteresis; | ||
| 51 | enum thermal_trip_type type; | ||
| 52 | }; | ||
| 53 | |||
| 54 | /** | ||
| 55 | * struct __thermal_bind_param - a match between trip and cooling device | 40 | * struct __thermal_bind_param - a match between trip and cooling device |
| 56 | * @cooling_device: a pointer to identify the referred cooling device | 41 | * @cooling_device: a pointer to identify the referred cooling device |
| 57 | * @trip_id: the trip point index | 42 | * @trip_id: the trip point index |
| @@ -88,7 +73,7 @@ struct __thermal_zone { | |||
| 88 | 73 | ||
| 89 | /* trip data */ | 74 | /* trip data */ |
| 90 | int ntrips; | 75 | int ntrips; |
| 91 | struct __thermal_trip *trips; | 76 | struct thermal_trip *trips; |
| 92 | 77 | ||
| 93 | /* cooling binding data */ | 78 | /* cooling binding data */ |
| 94 | int num_tbps; | 79 | int num_tbps; |
| @@ -538,7 +523,7 @@ EXPORT_SYMBOL_GPL(thermal_zone_of_sensor_unregister); | |||
| 538 | */ | 523 | */ |
| 539 | static int thermal_of_populate_bind_params(struct device_node *np, | 524 | static int thermal_of_populate_bind_params(struct device_node *np, |
| 540 | struct __thermal_bind_params *__tbp, | 525 | struct __thermal_bind_params *__tbp, |
| 541 | struct __thermal_trip *trips, | 526 | struct thermal_trip *trips, |
| 542 | int ntrips) | 527 | int ntrips) |
| 543 | { | 528 | { |
| 544 | struct of_phandle_args cooling_spec; | 529 | struct of_phandle_args cooling_spec; |
| @@ -641,7 +626,7 @@ static int thermal_of_get_trip_type(struct device_node *np, | |||
| 641 | * Return: 0 on success, proper error code otherwise | 626 | * Return: 0 on success, proper error code otherwise |
| 642 | */ | 627 | */ |
| 643 | static int thermal_of_populate_trip(struct device_node *np, | 628 | static int thermal_of_populate_trip(struct device_node *np, |
| 644 | struct __thermal_trip *trip) | 629 | struct thermal_trip *trip) |
| 645 | { | 630 | { |
| 646 | int prop; | 631 | int prop; |
| 647 | int ret; | 632 | int ret; |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 5bc28a70014e..b8d91efa854e 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -303,6 +303,21 @@ struct thermal_zone_of_device_ops { | |||
| 303 | int (*get_trend)(void *, long *); | 303 | int (*get_trend)(void *, long *); |
| 304 | }; | 304 | }; |
| 305 | 305 | ||
| 306 | /** | ||
| 307 | * struct thermal_trip - representation of a point in temperature domain | ||
| 308 | * @np: pointer to struct device_node that this trip point was created from | ||
| 309 | * @temperature: temperature value in miliCelsius | ||
| 310 | * @hysteresis: relative hysteresis in miliCelsius | ||
| 311 | * @type: trip point type | ||
| 312 | */ | ||
| 313 | |||
| 314 | struct thermal_trip { | ||
| 315 | struct device_node *np; | ||
| 316 | unsigned long int temperature; | ||
| 317 | unsigned long int hysteresis; | ||
| 318 | enum thermal_trip_type type; | ||
| 319 | }; | ||
| 320 | |||
| 306 | /* Function declarations */ | 321 | /* Function declarations */ |
| 307 | #ifdef CONFIG_THERMAL_OF | 322 | #ifdef CONFIG_THERMAL_OF |
| 308 | struct thermal_zone_device * | 323 | struct thermal_zone_device * |
