Commit 68e9c603 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 96c5330b
...@@ -115,7 +115,8 @@ struct thermal_soc_data { ...@@ -115,7 +115,8 @@ struct thermal_soc_data {
}; };
static struct thermal_trip trips[] = { static struct thermal_trip trips[] = {
[IMX_TRIP_PASSIVE] = { .type = THERMAL_TRIP_PASSIVE }, [IMX_TRIP_PASSIVE] = { .type = THERMAL_TRIP_PASSIVE,
.flags = THERMAL_TRIP_FLAG_RW_TEMP },
[IMX_TRIP_CRITICAL] = { .type = THERMAL_TRIP_CRITICAL }, [IMX_TRIP_CRITICAL] = { .type = THERMAL_TRIP_CRITICAL },
}; };
...@@ -700,7 +701,7 @@ static int imx_thermal_probe(struct platform_device *pdev) ...@@ -700,7 +701,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone", data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone",
trips, trips,
ARRAY_SIZE(trips), ARRAY_SIZE(trips),
BIT(IMX_TRIP_PASSIVE), data, 0, data,
&imx_tz_ops, NULL, &imx_tz_ops, NULL,
IMX_PASSIVE_DELAY, IMX_PASSIVE_DELAY,
IMX_POLLING_DELAY); IMX_POLLING_DELAY);
......
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