[BACK]Return to hwmon.h CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / include / linux

File: [Development] / linux-2.6-xfs / include / linux / hwmon.h (download)

Revision 1.1, Fri Oct 28 16:02:11 2005 UTC (12 years ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN

Merge up to 2.6.14
Merge of 2.6.x-xfs-melb:linux:24258a by kenmcd.

/*
    hwmon.h - part of lm_sensors, Linux kernel modules for hardware monitoring

    This file declares helper functions for the sysfs class "hwmon",
    for use by sensors drivers.

    Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; version 2 of the License.
*/

#ifndef _HWMON_H_
#define _HWMON_H_

#include <linux/device.h>

struct class_device *hwmon_device_register(struct device *dev);

void hwmon_device_unregister(struct class_device *cdev);

/* Scale user input to sensible values */
static inline int SENSORS_LIMIT(long value, long low, long high)
{
	if (value < low)
		return low;
	else if (value > high)
		return high;
	else
		return value;
}

#endif