mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-26 20:38:20 +00:00
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:
1 parent
63443070b3
commit
e9c0fce42a
22 files changed
+2695
-29
No files matched your search
@@ -46,6 +46,9 @@ endif
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1025=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1025.o
|
||||
endif
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM1026=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
KERNELCHIPSTARGETS += $(MODULE_DIR)/adm1026.o
|
||||
endif
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS_ADM9240=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
KERNELCHIPSTARGETS += $(MODULE_DIR)/adm9240.o
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+5
-4
@@ -483,6 +483,9 @@ static struct i2c_driver lm85_driver = {
|
||||
.detach_client = &lm85_detach_client,
|
||||
};
|
||||
|
||||
/* Unique ID assigned to each LM85 detected */
|
||||
static int lm85_id = 0;
|
||||
|
||||
/* -- SENSORS SYSCTL START -- */
|
||||
/* Common parameters */
|
||||
#define LM85_SYSCTL_IN0 1000
|
||||
@@ -552,9 +555,6 @@ static struct i2c_driver lm85_driver = {
|
||||
#define LM85_ALARM_TEMP3_FAULT 0x08000
|
||||
/* -- SENSORS SYSCTL END -- */
|
||||
|
||||
/* Unique ID assigned to each LM85 detected */
|
||||
static int lm85_id = 0;
|
||||
|
||||
/* The /proc/sys entries */
|
||||
/* These files are created for each detected LM85. This is just a template;
|
||||
* The actual list is built from this and additional per-chip
|
||||
@@ -1567,6 +1567,7 @@ void lm85_pwm_config(struct i2c_client *client, int operation, int ctl_name,
|
||||
*nrels_mag = 5;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
int old_config ;
|
||||
|
||||
down(&data->update_lock);
|
||||
old_config = data->autofan[nr].config ;
|
||||
if (*nrels_mag > 4) {
|
||||
@@ -1929,7 +1930,7 @@ void adt7463_therm_signal(struct i2c_client *client, int operation,
|
||||
|
||||
static int __init sm_lm85_init(void)
|
||||
{
|
||||
printk("lm85 version %s (%s)\n", LM_VERSION, LM_DATE);
|
||||
printk("lm85: Version %s (%s)\n", LM_VERSION, LM_DATE);
|
||||
printk("lm85: See http://www.penguincomputing.com/lm_sensors for more info.\n" );
|
||||
return i2c_add_driver(&lm85_driver);
|
||||
}
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ static void lm92_alarms (struct i2c_client *client,int operation,int ctl_name,in
|
||||
|
||||
/* -- SENSORS SYSCTL START -- */
|
||||
#define LM92_SYSCTL_ALARMS 2001 /* high, low, critical */
|
||||
#define LM92_SYSCTL_TEMP 1200 /* high, low, critical, hysterisis, input */
|
||||
#define LM92_SYSCTL_TEMP 1200 /* high, low, critical, hysteresis, input */
|
||||
|
||||
#define LM92_ALARM_TEMP_HIGH 0x01
|
||||
#define LM92_ALARM_TEMP_LOW 0x02
|
||||
|
||||
@@ -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
|
||||
@@ -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];
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user