Blame view

include/thermal.h 756 Bytes
e3568d2ec   Ye.Li   DM: thermal: Add ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  /*
   *
   * (C) Copyright 2014 Freescale Semiconductor, Inc
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
  
  #ifndef _THERMAL_H_
  #define _THERMAL_H_
  
  #include <dm.h>
  
  int thermal_get_temp(struct udevice *dev, int *temp);
  
  /**
6918f974c   Fabio Estevam   thermal: Fix comm...
16
   * struct dm_thermal_ops - Driver model Thermal operations
e3568d2ec   Ye.Li   DM: thermal: Add ...
17
18
19
20
21
22
23
24
   *
   * 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...
25
26
  	 * 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 ...
27
28
  	 *
  	 * @dev:	The Thermal device
6918f974c   Fabio Estevam   thermal: Fix comm...
29
  	 * @temp:	pointer that returns the measured temperature
e3568d2ec   Ye.Li   DM: thermal: Add ...
30
31
32
33
34
  	 */
  	int (*get_temp)(struct udevice *dev, int *temp);
  };
  
  #endif	/* _THERMAL_H_ */