diff options
author | John Crispin <john@openwrt.org> | 2016-03-21 20:42:51 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-03-21 20:42:51 +0000 |
commit | 5d2f529c9b83d5f769258928b5ddd82f4dc9979e (patch) | |
tree | 65ecb999d7bfda861006ffba75f375c1d7c8260d /target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch | |
parent | c8a6c583fc5f5c0834f993b591d6bb52d958c99a (diff) | |
download | mtk-20170518-5d2f529c9b83d5f769258928b5ddd82f4dc9979e.zip mtk-20170518-5d2f529c9b83d5f769258928b5ddd82f4dc9979e.tar.gz mtk-20170518-5d2f529c9b83d5f769258928b5ddd82f4dc9979e.tar.bz2 |
mediatek: bump to v4.4
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 49064
Diffstat (limited to 'target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch')
-rw-r--r-- | target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch b/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch deleted file mode 100644 index 09c9f24..0000000 --- a/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 525f68bb9d9f6334dbcd2b5ec99f9d797ff53618 Mon Sep 17 00:00:00 2001 -From: Sascha Hauer <s.hauer@pengutronix.de> -Date: Wed, 13 May 2015 10:52:40 +0200 -Subject: [PATCH 21/76] thermal: of: implement .set_trips for device tree - thermal zones - -Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> ---- - drivers/thermal/of-thermal.c | 12 ++++++++++++ - include/linux/thermal.h | 3 +++ - 2 files changed, 15 insertions(+) - ---- a/drivers/thermal/of-thermal.c -+++ b/drivers/thermal/of-thermal.c -@@ -97,6 +97,17 @@ static int of_thermal_get_temp(struct th - return data->ops->get_temp(data->sensor_data, temp); - } - -+static int of_thermal_set_trips(struct thermal_zone_device *tz, -+ int low, int high) -+{ -+ struct __thermal_zone *data = tz->devdata; -+ -+ if (!data->ops || !data->ops->set_trips) -+ return -ENOSYS; -+ -+ return data->ops->set_trips(data->sensor_data, low, high); -+} -+ - /** - * of_thermal_get_ntrips - function to export number of available trip - * points. -@@ -367,6 +378,7 @@ static int of_thermal_get_crit_temp(stru - - static const struct thermal_zone_device_ops of_thermal_ops = { - .get_temp = of_thermal_get_temp, -+ .set_trips = of_thermal_set_trips, - .get_trend = of_thermal_get_trend, - .set_emul_temp = of_thermal_set_emul_temp, - ---- a/include/linux/thermal.h -+++ b/include/linux/thermal.h -@@ -272,12 +272,15 @@ struct thermal_genl_event { - * - * Optional: - * @get_trend: a pointer to a function that reads the sensor temperature trend. -+ * @set_trips: a pointer to a function that sets a temperature window which shall -+ * trigger an interrupt when it is left. - * @set_emul_temp: a pointer to a function that sets sensor emulated - * temperature. - */ - struct thermal_zone_of_device_ops { - int (*get_temp)(void *, int *); - int (*get_trend)(void *, int, enum thermal_trend *); -+ int (*set_trips)(void *, int, int); - int (*set_emul_temp)(void *, int); - }; - |