/* Callback to get current temperature */ staticint db8500_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
{ struct db8500_thermal_zone *th = thermal_zone_device_priv(tz);
dev_dbg(th->dev, "PRCMU set max %ld, min %ld\n", next_high, next_low);
} elseif (idx == num_points - 1) /* So we roof out 1 degree over the max point */
th->interpolated_temp = db8500_thermal_points[idx] + 1;
th = devm_kzalloc(dev, sizeof(*th), GFP_KERNEL); if (!th) return -ENOMEM;
th->dev = dev;
low_irq = platform_get_irq_byname(pdev, "IRQ_HOTMON_LOW"); if (low_irq < 0) return low_irq;
ret = devm_request_threaded_irq(dev, low_irq, NULL,
prcmu_low_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT, "dbx500_temp_low", th); if (ret < 0) {
dev_err(dev, "failed to allocate temp low irq\n"); return ret;
}
high_irq = platform_get_irq_byname(pdev, "IRQ_HOTMON_HIGH"); if (high_irq < 0) return high_irq;
ret = devm_request_threaded_irq(dev, high_irq, NULL,
prcmu_high_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT, "dbx500_temp_high", th); if (ret < 0) {
dev_err(dev, "failed to allocate temp high irq\n"); return ret;
}
/* register of thermal sensor and get info from DT */
th->tz = devm_thermal_of_zone_register(dev, 0, th, &thdev_ops); if (IS_ERR(th->tz)) {
dev_err(dev, "register thermal zone sensor failed\n"); return PTR_ERR(th->tz);
}
dev_info(dev, "thermal zone sensor registered\n");
/* Start measuring at the lowest point */
db8500_thermal_update_config(th, 0, PRCMU_DEFAULT_LOW_TEMP,
db8500_thermal_points[0]);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.