Blame view

include/thermal.h 756 Bytes
83d290c56   Tom Rini   SPDX: Convert all...
1
  /* SPDX-License-Identifier: GPL-2.0+ */
e3568d2ec   Ye.Li   DM: thermal: Add ...
2
3
4
  /*
   *
   * (C) Copyright 2014 Freescale Semiconductor, Inc
e3568d2ec   Ye.Li   DM: thermal: Add ...
5
6
7
8
9
10
11
12
13
14
   */
  
  #ifndef _THERMAL_H_
  #define _THERMAL_H_
  
  #include <dm.h>
  
  int thermal_get_temp(struct udevice *dev, int *temp);
  
  /**
6918f974c   Fabio Estevam   thermal: Fix comm...
15
   * struct dm_thermal_ops - Driver model Thermal operations
e3568d2ec   Ye.Li   DM: thermal: Add ...
16
17
18
19
20
21
22
23
   *
   * The uclass interface is implemented by all Thermal devices which use
   * driver model.
   */
  struct dm_thermal_ops {
  	/**
  	 * Get the current temperature
  	 *
6918f974c   Fabio Estevam   thermal: Fix comm...
24
25
  	 * This must be called before doing any transfers with a Thermal device.
  	 * It will enable and initialize any Thermal hardware as necessary.
e3568d2ec   Ye.Li   DM: thermal: Add ...
26
27
  	 *
  	 * @dev:	The Thermal device
6918f974c   Fabio Estevam   thermal: Fix comm...
28
  	 * @temp:	pointer that returns the measured temperature
e3568d2ec   Ye.Li   DM: thermal: Add ...
29
30
31
32
33
  	 */
  	int (*get_temp)(struct udevice *dev, int *temp);
  };
  
  #endif	/* _THERMAL_H_ */