/*
 Motherboard hardware monitor driver
 
 Copyright (c) 2008 Dimtel, Inc., All Rights Reserved

 $Id: hwmon.h,v 1.3 2011/12/28 09:43:18 dim Exp $
 $Date: 2011/12/28 09:43:18 $
 $Author: dim $
 $Revision: 1.3 $
 $Log: hwmon.h,v $
 Revision 1.3  2011/12/28 09:43:18  dim
 Added board_name detection method to existing product_name

 Revision 1.2  2011/12/07 19:18:25  dim
 Renamed poll.c to hwpoll.c, changed detection to /sys/class/dmi/id/product_name

 Revision 1.1.1.1  2009/06/03 10:21:38  dim
 Initial import


*/

#ifndef HWMON_H
#define HWMON_H

#define HWMON_BUF 1024

#define DMI_PATH  "/sys/class/dmi/id/"
#define BASE_PATH "/sys/class/hwmon/hwmon0/device/"

typedef struct hwmon_device
{
  char *name;
  char *cpu_fan;
  char *chassis_fan;
  char *cpu_temp;
} hwmon_device;

typedef struct hwmon_data
{
  double cpu_temp;
  long   cpu_fan;
  long   chassis_fan;
} hwmon_data;

int hwmon_init(void);
int hwmon_read_raw(char *name);
int hwmon_read(hwmon_data *data);

#endif /* HWMON_H */
