Commit 83720d0b authored by Jonghwa Lee's avatar Jonghwa Lee Committed by Zhang Rui

Thermal: core: Ask .get_trip_temp() to register thermal zone device.

This patch adds a requirement needing .get_trip_temp() callback
function for registering thermal zone device. This function is
used when thermal zone is updated and essential where thermal core
handles thermal trip based only polling way not hw interrupt.
Signed-off-by: default avatarJonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: default avatarDurgadoss R <durgadoss.r@intel.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 42a5bf50
...@@ -1628,7 +1628,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type, ...@@ -1628,7 +1628,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
if (!ops || !ops->get_temp) if (!ops || !ops->get_temp)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
if (trips > 0 && !ops->get_trip_type) if (trips > 0 && (!ops->get_trip_type || !ops->get_trip_temp))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL); tz = kzalloc(sizeof(struct thermal_zone_device), GFP_KERNEL);
......
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