mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-17 19:30:26 +00:00
(Phil) thmc50.o now compiles and inserts as part of the package.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@560 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
8bd24883ce
commit
c25252d479
3 files changed
+13
-4
No files matched your search
@@ -28,7 +28,8 @@ KERNELCHIPSTARGETS := $(MODULE_DIR)/adm1021.o $(MODULE_DIR)/adm9240.o \
|
||||
$(MODULE_DIR)/lm80.o $(MODULE_DIR)/ltc1710.o \
|
||||
$(MODULE_DIR)/w83781d.o $(MODULE_DIR)/sis5595.o \
|
||||
$(MODULE_DIR)/maxilife.o $(MODULE_DIR)/bt869.o \
|
||||
$(MODULE_DIR)/matorb.o $(MODULE_DIR)/gl520sm.o
|
||||
$(MODULE_DIR)/matorb.o $(MODULE_DIR)/gl520sm.o \
|
||||
$(MODULE_DIR)/thmc50.o
|
||||
|
||||
# Include all dependency files
|
||||
INCLUDEFILES += $(KERNELCHIPSTARGETS:.o=.d)
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#define DEBUG 1
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/malloc.h>
|
||||
#include <linux/i2c.h>
|
||||
@@ -143,12 +145,16 @@ int thmc50_attach_adapter(struct i2c_adapter *adapter)
|
||||
/* This function is called by sensors_detect */
|
||||
int thmc50_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
{
|
||||
int company;
|
||||
int company,i;
|
||||
struct i2c_client *new_client;
|
||||
struct thmc50_data *data;
|
||||
int err=0;
|
||||
const char *type_name,*client_name;
|
||||
|
||||
#ifdef DEBUG
|
||||
printk("Probing for THMC50 at 0x%2.X on bus %d\n",address,adapter->id);
|
||||
#endif
|
||||
|
||||
/* Make sure we aren't probing the ISA bus!! This is just a safety check
|
||||
at this moment; sensors_detect really won't call us. */
|
||||
#ifdef DEBUG
|
||||
@@ -179,8 +185,6 @@ int thmc50_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
|
||||
/* Now, we do the remaining detection. */
|
||||
company = i2c_smbus_read_byte_data(adapter,address,0x3E);
|
||||
= i2c_smbus_read_word_data(adapter,address,2);
|
||||
os = i2c_smbus_read_word_data(adapter,address,3);
|
||||
|
||||
if (company != 0x4E)
|
||||
goto ERROR1;
|
||||
|
||||
@@ -327,6 +327,7 @@ extern inline int SENSORS_LIMIT(long value, long low, long high)
|
||||
#define I2C_DRIVERID_MAXILIFE 1014
|
||||
#define I2C_DRIVERID_MATORB 1015
|
||||
#define I2C_DRIVERID_GL520 1016
|
||||
#define I2C_DRIVERID_THMC50 1017
|
||||
|
||||
/* Sysctl IDs */
|
||||
#ifdef DEV_HWMON
|
||||
@@ -603,4 +604,7 @@ struct sensors_chips_data {
|
||||
|
||||
#define MATORB_SYSCTL_DISP 1000
|
||||
|
||||
#define THMC50_SYSCTL_TEMP 1200 /* Degrees Celcius */
|
||||
|
||||
|
||||
#endif /* def SENSORS_SENSORS_H */
|
||||
Reference in new issue
Block a user