From 392e8802486cb573b916e746010e141a75f507e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 09:58:27 +0800 Subject: init android origin source code --- ANDROID_3.4.5/include/linux/hwmon.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ANDROID_3.4.5/include/linux/hwmon.h (limited to 'ANDROID_3.4.5/include/linux/hwmon.h') diff --git a/ANDROID_3.4.5/include/linux/hwmon.h b/ANDROID_3.4.5/include/linux/hwmon.h new file mode 100644 index 00000000..82b29ae6 --- /dev/null +++ b/ANDROID_3.4.5/include/linux/hwmon.h @@ -0,0 +1,35 @@ +/* + 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 + + 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_ + +struct device; + +struct device *hwmon_device_register(struct device *dev); + +void hwmon_device_unregister(struct device *dev); + +/* 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 + -- cgit