[haiku-development] Re: RFC: Thermal sensors in /dev/

  • From: Alexander von Gluck <kallisti5@xxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 27 Nov 2011 13:53:21 -0600

On Sun, 27 Nov 2011 13:29:59 -0600, Alexander von Gluck wrote:
So,  the radeon_hd driver has the ability to query thermal GPU status
for the card.

I am thinking of introducing a
/dev/thermal/<driver_name>/<device_instance>/0 path for thermal info.

I personally think the layout above matches other things in /dev, and
is generic enough that
other drivers can use it.

Example for radeon_hd driver:

/dev/thermal/radeon_hd/0/0 would contain:

"
Radeon HD 5830 - GPU 0
44000
"

First line is a quick driver description of what thermal sensor this is
Second line is temperature in millidegree Celsius (to avoid floats)

Another Idea in IRC (thanks dr_evil) is returning binary data instead of
clear text and putting it into a simple struct:

/dev/sensors/radeon_hd/0/0 would be placed over the following API header:

struct {
  char*  name;
  int32  value;
} sensor_data;

I think sensors may be better as it is more generic and could include
fan speed, etc.

 -- Alex

Other related posts: