]> Git Repo - J-u-boot.git/blame - drivers/thermal/thermal-uclass.c
sandbox: Support signal handling only when requested
[J-u-boot.git] / drivers / thermal / thermal-uclass.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
e3568d2e
YL
2/*
3 * (C) Copyright 2014 Freescale Semiconductor, Inc
e3568d2e
YL
4 */
5
6#include <common.h>
7#include <dm.h>
8#include <thermal.h>
9#include <errno.h>
10#include <fdtdec.h>
11#include <malloc.h>
12#include <asm/io.h>
13#include <linux/list.h>
14
15
16int thermal_get_temp(struct udevice *dev, int *temp)
17{
18 const struct dm_thermal_ops *ops = device_get_ops(dev);
19
20 if (!ops->get_temp)
21 return -ENOSYS;
22
23 return ops->get_temp(dev, temp);
24}
25
26UCLASS_DRIVER(thermal) = {
27 .id = UCLASS_THERMAL,
28 .name = "thermal",
29};
This page took 0.306691 seconds and 4 git commands to generate.