Skip to content

Commit 68e9c60

Browse files
committed
thermal: imx: Set THERMAL_TRIP_FLAG_RW_TEMP directly
It is now possible to flag trip points with THERMAL_TRIP_FLAG_RW_TEMP to allow their temperature to be set from user space via sysfs instead of using a nonzero writable trips mask during thermal zone registration, so make the imx thermal code do that. No intentional functional impact. Note that this change is requisite for dropping the mask argument from thermal_zone_device_register_with_trips() going forward. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 96c5330 commit 68e9c60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/thermal/imx_thermal.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ struct thermal_soc_data {
115115
};
116116

117117
static struct thermal_trip trips[] = {
118-
[IMX_TRIP_PASSIVE] = { .type = THERMAL_TRIP_PASSIVE },
118+
[IMX_TRIP_PASSIVE] = { .type = THERMAL_TRIP_PASSIVE,
119+
.flags = THERMAL_TRIP_FLAG_RW_TEMP },
119120
[IMX_TRIP_CRITICAL] = { .type = THERMAL_TRIP_CRITICAL },
120121
};
121122

@@ -700,7 +701,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
700701
data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone",
701702
trips,
702703
ARRAY_SIZE(trips),
703-
BIT(IMX_TRIP_PASSIVE), data,
704+
0, data,
704705
&imx_tz_ops, NULL,
705706
IMX_PASSIVE_DELAY,
706707
IMX_POLLING_DELAY);

0 commit comments

Comments
 (0)