adm1026 and auto-sensors.h patch from P.P.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1777 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 2003-06-08 21:33:39 +00:00
1 parent 63443070b3
commit e9c0fce42a
22 files changed
+2695 -29

No files matched your search

+14 -1
View File
@@ -26,6 +26,19 @@ ifneq ($(shell if grep -q '^CONFIG_SENSORS=y' $(LINUX)/.config; then echo 1; fi)
KERNELINCLUDEFILES += $(MODULE_DIR)/sensors.h
endif
$(KERNELINCLUDEDIR)/sensors.h: $(KERNELINCLUDEDIR)/sensors.h.template
( cat $@.template ; \
$(AWK) '/SENSORS SYSCTL START/,/SENSORS SYSCTL END/' $(KERNELCHIPSDIR)/*.c ;\
echo '#endif' \
) > $@
$(KERNELINCLUDEDIR)/sensors.hd:
( $(GREP) 'SENSORS SYSCTL START' /dev/null $(KERNELCHIPSDIR)/*.c | \
$(SED) -e 's/:.*//' -e 's#^#$(KERNELINCLUDEDIR)/sensors.h: #' ) > $@
# Get dependancies of sensors.h
INCLUDEFILES += $(MODULE_DIR)/sensors.hd
install-all-kernel-include:
if [ -n "$(KERNELINCLUDEFILES)" ] ; then \
$(MKDIR) $(DESTDIR)$(SYSINCLUDEDIR) ; \
@@ -35,6 +48,6 @@ install-all-kernel-include:
install :: install-all-kernel-include
clean-all-kernel-include:
$(RM) $(KERNELINCLUDEDIR)/*.h.install
$(RM) $(KERNELINCLUDEDIR)/*.h.install $(KERNELINCLUDEDIR)/sensors.h $(KERNELINCLUDEDIR)/sensors.hd
clean :: clean-all-kernel-include
+53
View File
@@ -0,0 +1,53 @@
/*
sensors.h - Part of lm_sensors, Linux kernel modules for hardware
monitoring
Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
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; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef LIB_SENSORS_H
#define LIB_SENSORS_H
/* This file is intended to be included from userland utilities only.
*
* Individual drivers define their own SYSCTL and ALARM values in
* the driver itself surrounded by the following 'trigger' lines:
*
* -- SENSORS SYSCTL START --
* -- SENSORS SYSCTL END --
*/
/* From linux/i2c-proc.h */
/* Sysctl IDs */
#ifdef DEV_HWMON
#define DEV_SENSORS DEV_HWMON
#else /* ndef DEV_HWMOM */
#define DEV_SENSORS 2 /* The id of the lm_sensors directory within the
dev table */
#endif /* def DEV_HWMON */
/* The maximum length of the prefix */
#define SENSORS_PREFIX_MAX 20
#define SENSORS_CHIPS 1
struct i2c_chips_data {
int sysctl_id;
char name[SENSORS_PREFIX_MAX + 13];
};