]> git.sur5r.net Git - u-boot/blob - drivers/thermal/thermal-uclass.c
arm: imx6ul: Add Engicam GEAM6UL Starter Kit initial support
[u-boot] / drivers / thermal / thermal-uclass.c
1 /*
2  * (C) Copyright 2014 Freescale Semiconductor, Inc
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <dm.h>
9 #include <thermal.h>
10 #include <errno.h>
11 #include <fdtdec.h>
12 #include <malloc.h>
13 #include <asm/io.h>
14 #include <linux/list.h>
15
16
17 int thermal_get_temp(struct udevice *dev, int *temp)
18 {
19         const struct dm_thermal_ops *ops = device_get_ops(dev);
20
21         if (!ops->get_temp)
22                 return -ENOSYS;
23
24         return ops->get_temp(dev, temp);
25 }
26
27 UCLASS_DRIVER(thermal) = {
28         .id             = UCLASS_THERMAL,
29         .name           = "thermal",
30 };