w83781d.c (fde0950903ce8cc38a91dd095280decceda2ff82) | w83781d.c (2d8672c5a6ba0d3f1d8d3ad61ef67868941364f0) |
---|---|
1/* 2 w83781d.c - Part of lm_sensors, Linux kernel modules for hardware 3 monitoring 4 Copyright (c) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>, 5 Philip Edelbrock <phil@netroedge.com>, 6 and Mark Studebaker <mdsxyz123@yahoo.com> 7 8 This program is free software; you can redistribute it and/or modify --- 36 unchanged lines hidden (view full) --- 45#include <linux/err.h> 46#include <asm/io.h> 47#include "lm75.h" 48 49/* Addresses to scan */ 50static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 51 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 52 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; | 1/* 2 w83781d.c - Part of lm_sensors, Linux kernel modules for hardware 3 monitoring 4 Copyright (c) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>, 5 Philip Edelbrock <phil@netroedge.com>, 6 and Mark Studebaker <mdsxyz123@yahoo.com> 7 8 This program is free software; you can redistribute it and/or modify --- 36 unchanged lines hidden (view full) --- 45#include <linux/err.h> 46#include <asm/io.h> 47#include "lm75.h" 48 49/* Addresses to scan */ 50static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 51 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 52 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; |
53static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END }; | 53static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; 54static unsigned short isa_address = 0x290; |
54 55/* Insmod parameters */ 56SENSORS_INSMOD_5(w83781d, w83782d, w83783s, w83627hf, as99127f); 57I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: " 58 "{bus, clientaddr, subclientaddr1, subclientaddr2}"); 59 60static int init = 1; 61module_param(init, bool, 0); --- 192 unchanged lines hidden (view full) --- 254 1 = pentium diode; 2 = 3904 diode; 255 3000-5000 = thermistor beta. 256 Default = 3435. 257 Other Betas unimplemented */ 258 u8 vrm; 259}; 260 261static int w83781d_attach_adapter(struct i2c_adapter *adapter); | 55 56/* Insmod parameters */ 57SENSORS_INSMOD_5(w83781d, w83782d, w83783s, w83627hf, as99127f); 58I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: " 59 "{bus, clientaddr, subclientaddr1, subclientaddr2}"); 60 61static int init = 1; 62module_param(init, bool, 0); --- 192 unchanged lines hidden (view full) --- 255 1 = pentium diode; 2 = 3904 diode; 256 3000-5000 = thermistor beta. 257 Default = 3435. 258 Other Betas unimplemented */ 259 u8 vrm; 260}; 261 262static int w83781d_attach_adapter(struct i2c_adapter *adapter); |
263static int w83781d_isa_attach_adapter(struct i2c_adapter *adapter); |
|
262static int w83781d_detect(struct i2c_adapter *adapter, int address, int kind); 263static int w83781d_detach_client(struct i2c_client *client); 264 265static int w83781d_read_value(struct i2c_client *client, u16 register); 266static int w83781d_write_value(struct i2c_client *client, u16 register, 267 u16 value); 268static struct w83781d_data *w83781d_update_device(struct device *dev); 269static void w83781d_init_client(struct i2c_client *client); --- 5 unchanged lines hidden (view full) --- 275 .flags = I2C_DF_NOTIFY, 276 .attach_adapter = w83781d_attach_adapter, 277 .detach_client = w83781d_detach_client, 278}; 279 280static struct i2c_driver w83781d_isa_driver = { 281 .owner = THIS_MODULE, 282 .name = "w83781d-isa", | 264static int w83781d_detect(struct i2c_adapter *adapter, int address, int kind); 265static int w83781d_detach_client(struct i2c_client *client); 266 267static int w83781d_read_value(struct i2c_client *client, u16 register); 268static int w83781d_write_value(struct i2c_client *client, u16 register, 269 u16 value); 270static struct w83781d_data *w83781d_update_device(struct device *dev); 271static void w83781d_init_client(struct i2c_client *client); --- 5 unchanged lines hidden (view full) --- 277 .flags = I2C_DF_NOTIFY, 278 .attach_adapter = w83781d_attach_adapter, 279 .detach_client = w83781d_detach_client, 280}; 281 282static struct i2c_driver w83781d_isa_driver = { 283 .owner = THIS_MODULE, 284 .name = "w83781d-isa", |
283 .attach_adapter = w83781d_attach_adapter, | 285 .attach_adapter = w83781d_isa_attach_adapter, |
284 .detach_client = w83781d_detach_client, 285}; 286 287 288/* following are the sysfs callback functions */ 289#define show_in_reg(reg) \ 290static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ 291{ \ --- 574 unchanged lines hidden (view full) --- 866static int 867w83781d_attach_adapter(struct i2c_adapter *adapter) 868{ 869 if (!(adapter->class & I2C_CLASS_HWMON)) 870 return 0; 871 return i2c_detect(adapter, &addr_data, w83781d_detect); 872} 873 | 286 .detach_client = w83781d_detach_client, 287}; 288 289 290/* following are the sysfs callback functions */ 291#define show_in_reg(reg) \ 292static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ 293{ \ --- 574 unchanged lines hidden (view full) --- 868static int 869w83781d_attach_adapter(struct i2c_adapter *adapter) 870{ 871 if (!(adapter->class & I2C_CLASS_HWMON)) 872 return 0; 873 return i2c_detect(adapter, &addr_data, w83781d_detect); 874} 875 |
876static int 877w83781d_isa_attach_adapter(struct i2c_adapter *adapter) 878{ 879 return w83781d_detect(adapter, isa_address, -1); 880} 881 |
|
874/* Assumes that adapter is of I2C, not ISA variety. 875 * OTHERWISE DON'T CALL THIS 876 */ 877static int 878w83781d_detect_subclients(struct i2c_adapter *adapter, int address, int kind, 879 struct i2c_client *new_client) 880{ 881 int i, val1 = 0, id; --- 796 unchanged lines hidden --- | 882/* Assumes that adapter is of I2C, not ISA variety. 883 * OTHERWISE DON'T CALL THIS 884 */ 885static int 886w83781d_detect_subclients(struct i2c_adapter *adapter, int address, int kind, 887 struct i2c_client *new_client) 888{ 889 int i, val1 = 0, id; --- 796 unchanged lines hidden --- |