@@ -155,6 +155,8 @@ int of_thermal_get_ntrips(struct thermal_zone_device *);
bool of_thermal_is_trip_valid(struct thermal_zone_device *, int);
const struct thermal_trip *
of_thermal_get_trip_points(struct thermal_zone_device *);
+int thermal_of_populate_trip(struct device_node *np,
+ struct thermal_trip *trip);
#else
static inline int of_parse_thermal_zones(void) { return 0; }
static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz)
@@ -171,6 +173,11 @@ of_thermal_get_trip_points(struct thermal_zone_device *tz)
{
return NULL;
}
+static inline int thermal_of_populate_trip(struct device_node *np,
+ struct thermal_trip *trip)
+{
+ return -ENOTSUP;
+}
#endif
int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
@@ -817,8 +817,8 @@ static int thermal_of_get_trip_type(struct device_node *np,
*
* Return: 0 on success, proper error code otherwise
*/
-static int thermal_of_populate_trip(struct device_node *np,
- struct thermal_trip *trip)
+int thermal_of_populate_trip(struct device_node *np,
+ struct thermal_trip *trip)
{
int prop;
int ret;
@@ -849,6 +849,7 @@ static int thermal_of_populate_trip(struct device_node *np,
return 0;
}
+EXPORT_SYMBOL_GPL(thermal_of_populate_trip);
/**
* thermal_of_build_thermal_zone - parse and fill one thermal zone data
Export function that populate thermal trip struct from a of node to be able to re-use it in thermal drivers different from thermal_of. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> --- drivers/thermal/thermal_core.h | 7 +++++++ drivers/thermal/thermal_of.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-)