aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch')
-rw-r--r--target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch34
1 files changed, 17 insertions, 17 deletions
diff --git a/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch b/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch
index 54488f25a8..cdb54b9053 100644
--- a/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch
+++ b/target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch
@@ -27,8 +27,8 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
{
struct __thermal_zone *data = tz->devdata;
-- if (!data->ops->get_temp)
-+ if (!data->ops->get_temp || (data->mode == THERMAL_DEVICE_DISABLED))
+- if (!data->ops || !data->ops->get_temp)
++ if (!data->ops || !data->ops->get_temp || (data->mode == THERMAL_DEVICE_DISABLED))
return -EINVAL;
return data->ops->get_temp(data->sensor_data, temp);
@@ -42,9 +42,9 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return -EINVAL;
return data->ops->set_trips(data->sensor_data, low, high);
-@@ -188,6 +189,9 @@ static int of_thermal_set_emul_temp(stru
- {
- struct __thermal_zone *data = tz->devdata;
+@@ -191,6 +192,9 @@ static int of_thermal_set_emul_temp(stru
+ if (!data->ops || !data->ops->set_emul_temp)
+ return -EINVAL;
+ if (data->mode == THERMAL_DEVICE_DISABLED)
+ return -EINVAL;
@@ -52,16 +52,16 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return data->ops->set_emul_temp(data->sensor_data, temp);
}
-@@ -196,7 +200,7 @@ static int of_thermal_get_trend(struct t
+@@ -199,7 +203,7 @@ static int of_thermal_get_trend(struct t
{
struct __thermal_zone *data = tz->devdata;
-- if (!data->ops->get_trend)
-+ if (!data->ops->get_trend || (data->mode == THERMAL_DEVICE_DISABLED))
+- if (!data->ops || !data->ops->get_trend)
++ if (!data->ops || !data->ops->get_trend || (data->mode == THERMAL_DEVICE_DISABLED))
return -EINVAL;
return data->ops->get_trend(data->sensor_data, trip, trend);
-@@ -297,7 +301,9 @@ static int of_thermal_set_mode(struct th
+@@ -300,7 +304,9 @@ static int of_thermal_set_mode(struct th
mutex_unlock(&tz->lock);
data->mode = mode;
@@ -72,7 +72,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return 0;
}
-@@ -307,7 +313,8 @@ static int of_thermal_get_trip_type(stru
+@@ -310,7 +316,8 @@ static int of_thermal_get_trip_type(stru
{
struct __thermal_zone *data = tz->devdata;
@@ -82,7 +82,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return -EDOM;
*type = data->trips[trip].type;
-@@ -315,12 +322,39 @@ static int of_thermal_get_trip_type(stru
+@@ -318,12 +325,39 @@ static int of_thermal_get_trip_type(stru
return 0;
}
@@ -123,7 +123,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return -EDOM;
*temp = data->trips[trip].temperature;
-@@ -333,7 +367,8 @@ static int of_thermal_set_trip_temp(stru
+@@ -336,7 +370,8 @@ static int of_thermal_set_trip_temp(stru
{
struct __thermal_zone *data = tz->devdata;
@@ -132,8 +132,8 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
+ || (data->mode == THERMAL_DEVICE_DISABLED))
return -EDOM;
- if (data->ops->set_trip_temp) {
-@@ -355,7 +390,8 @@ static int of_thermal_get_trip_hyst(stru
+ if (data->ops && data->ops->set_trip_temp) {
+@@ -358,7 +393,8 @@ static int of_thermal_get_trip_hyst(stru
{
struct __thermal_zone *data = tz->devdata;
@@ -143,7 +143,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return -EDOM;
*hyst = data->trips[trip].hysteresis;
-@@ -368,7 +404,8 @@ static int of_thermal_set_trip_hyst(stru
+@@ -371,7 +407,8 @@ static int of_thermal_set_trip_hyst(stru
{
struct __thermal_zone *data = tz->devdata;
@@ -153,7 +153,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
return -EDOM;
/* thermal framework should take care of data->mask & (1 << trip) */
-@@ -443,6 +480,9 @@ thermal_zone_of_add_sensor(struct device
+@@ -446,6 +483,9 @@ thermal_zone_of_add_sensor(struct device
if (ops->set_emul_temp)
tzd->ops->set_emul_temp = of_thermal_set_emul_temp;
@@ -163,7 +163,7 @@ Signed-off-by: Rajith Cherian <rajith@codeaurora.org>
mutex_unlock(&tzd->lock);
return tzd;
-@@ -765,7 +805,10 @@ static const char * const trip_types[] =
+@@ -768,7 +808,10 @@ static const char * const trip_types[] =
[THERMAL_TRIP_ACTIVE] = "active",
[THERMAL_TRIP_PASSIVE] = "passive",
[THERMAL_TRIP_HOT] = "hot",