|
|
@ -79,7 +79,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
return -EINVAL;
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
|
|
|
|
return data->ops->get_trend(data->sensor_data, trip, trend);
|
|
|
|
return data->ops->get_trend(data->sensor_data, trip, trend);
|
|
|
|
@@ -286,7 +290,9 @@ static int of_thermal_set_mode(struct th
|
|
|
|
@@ -289,7 +293,9 @@ static int of_thermal_set_mode(struct th
|
|
|
|
mutex_unlock(&tz->lock);
|
|
|
|
mutex_unlock(&tz->lock);
|
|
|
|
|
|
|
|
|
|
|
|
data->mode = mode;
|
|
|
|
data->mode = mode;
|
|
|
@ -90,7 +90,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -296,7 +302,8 @@ static int of_thermal_get_trip_type(stru
|
|
|
|
@@ -299,7 +305,8 @@ static int of_thermal_get_trip_type(stru
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
|
|
|
|
|
|
|
@ -100,7 +100,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
return -EDOM;
|
|
|
|
return -EDOM;
|
|
|
|
|
|
|
|
|
|
|
|
*type = data->trips[trip].type;
|
|
|
|
*type = data->trips[trip].type;
|
|
|
|
@@ -304,12 +311,39 @@ static int of_thermal_get_trip_type(stru
|
|
|
|
@@ -307,12 +314,39 @@ static int of_thermal_get_trip_type(stru
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -141,7 +141,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
return -EDOM;
|
|
|
|
return -EDOM;
|
|
|
|
|
|
|
|
|
|
|
|
*temp = data->trips[trip].temperature;
|
|
|
|
*temp = data->trips[trip].temperature;
|
|
|
|
@@ -322,7 +356,8 @@ static int of_thermal_set_trip_temp(stru
|
|
|
|
@@ -325,7 +359,8 @@ static int of_thermal_set_trip_temp(stru
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
|
|
|
|
|
|
|
@ -151,7 +151,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
return -EDOM;
|
|
|
|
return -EDOM;
|
|
|
|
|
|
|
|
|
|
|
|
if (data->ops->set_trip_temp) {
|
|
|
|
if (data->ops->set_trip_temp) {
|
|
|
|
@@ -344,7 +379,8 @@ static int of_thermal_get_trip_hyst(stru
|
|
|
|
@@ -347,7 +382,8 @@ static int of_thermal_get_trip_hyst(stru
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
|
|
|
|
|
|
|
@ -161,7 +161,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
return -EDOM;
|
|
|
|
return -EDOM;
|
|
|
|
|
|
|
|
|
|
|
|
*hyst = data->trips[trip].hysteresis;
|
|
|
|
*hyst = data->trips[trip].hysteresis;
|
|
|
|
@@ -357,7 +393,8 @@ static int of_thermal_set_trip_hyst(stru
|
|
|
|
@@ -360,7 +396,8 @@ static int of_thermal_set_trip_hyst(stru
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
struct __thermal_zone *data = tz->devdata;
|
|
|
|
|
|
|
|
|
|
|
@ -171,7 +171,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
return -EDOM;
|
|
|
|
return -EDOM;
|
|
|
|
|
|
|
|
|
|
|
|
/* thermal framework should take care of data->mask & (1 << trip) */
|
|
|
|
/* thermal framework should take care of data->mask & (1 << trip) */
|
|
|
|
@@ -432,6 +469,9 @@ thermal_zone_of_add_sensor(struct device
|
|
|
|
@@ -435,6 +472,9 @@ thermal_zone_of_add_sensor(struct device
|
|
|
|
if (ops->set_emul_temp)
|
|
|
|
if (ops->set_emul_temp)
|
|
|
|
tzd->ops->set_emul_temp = of_thermal_set_emul_temp;
|
|
|
|
tzd->ops->set_emul_temp = of_thermal_set_emul_temp;
|
|
|
|
|
|
|
|
|
|
|
@ -181,7 +181,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org> |
|
|
|
mutex_unlock(&tzd->lock);
|
|
|
|
mutex_unlock(&tzd->lock);
|
|
|
|
|
|
|
|
|
|
|
|
return tzd;
|
|
|
|
return tzd;
|
|
|
|
@@ -726,7 +766,10 @@ static const char * const trip_types[] =
|
|
|
|
@@ -729,7 +769,10 @@ static const char * const trip_types[] =
|
|
|
|
[THERMAL_TRIP_ACTIVE] = "active",
|
|
|
|
[THERMAL_TRIP_ACTIVE] = "active",
|
|
|
|
[THERMAL_TRIP_PASSIVE] = "passive",
|
|
|
|
[THERMAL_TRIP_PASSIVE] = "passive",
|
|
|
|
[THERMAL_TRIP_HOT] = "hot",
|
|
|
|
[THERMAL_TRIP_HOT] = "hot",
|
|
|
|