imx_thermal.c (1e1b37273cf719545da50b76f214f983a710aaf4) imx_thermal.c (0e70f466fb910ae54c4c71243b99385129e93feb)
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */

--- 232 unchanged lines hidden (view full) ---

241
242 if (data->irq_enabled) {
243 disable_irq(data->irq);
244 data->irq_enabled = false;
245 }
246 }
247
248 data->mode = mode;
1/*
2 * Copyright 2013 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */

--- 232 unchanged lines hidden (view full) ---

241
242 if (data->irq_enabled) {
243 disable_irq(data->irq);
244 data->irq_enabled = false;
245 }
246 }
247
248 data->mode = mode;
249 thermal_zone_device_update(tz);
249 thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
250
251 return 0;
252}
253
254static int imx_get_trip_type(struct thermal_zone_device *tz, int trip,
255 enum thermal_trip_type *type)
256{
257 *type = (trip == IMX_TRIP_PASSIVE) ? THERMAL_TRIP_PASSIVE :

--- 194 unchanged lines hidden (view full) ---

452
453static irqreturn_t imx_thermal_alarm_irq_thread(int irq, void *dev)
454{
455 struct imx_thermal_data *data = dev;
456
457 dev_dbg(&data->tz->device, "THERMAL ALARM: T > %d\n",
458 data->alarm_temp / 1000);
459
250
251 return 0;
252}
253
254static int imx_get_trip_type(struct thermal_zone_device *tz, int trip,
255 enum thermal_trip_type *type)
256{
257 *type = (trip == IMX_TRIP_PASSIVE) ? THERMAL_TRIP_PASSIVE :

--- 194 unchanged lines hidden (view full) ---

452
453static irqreturn_t imx_thermal_alarm_irq_thread(int irq, void *dev)
454{
455 struct imx_thermal_data *data = dev;
456
457 dev_dbg(&data->tz->device, "THERMAL ALARM: T > %d\n",
458 data->alarm_temp / 1000);
459
460 thermal_zone_device_update(data->tz);
460 thermal_zone_device_update(data->tz, THERMAL_EVENT_UNSPECIFIED);
461
462 return IRQ_HANDLED;
463}
464
465static const struct of_device_id of_imx_thermal_match[] = {
466 { .compatible = "fsl,imx6q-tempmon", .data = &thermal_imx6q_data, },
467 { .compatible = "fsl,imx6sx-tempmon", .data = &thermal_imx6sx_data, },
468 { /* end */ }

--- 207 unchanged lines hidden ---
461
462 return IRQ_HANDLED;
463}
464
465static const struct of_device_id of_imx_thermal_match[] = {
466 { .compatible = "fsl,imx6q-tempmon", .data = &thermal_imx6q_data, },
467 { .compatible = "fsl,imx6sx-tempmon", .data = &thermal_imx6sx_data, },
468 { /* end */ }

--- 207 unchanged lines hidden ---