Commit c3efc929 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge kroah.com:/home/greg/linux/BK/bleed-2.5

into kroah.com:/home/greg/linux/BK/i2c-2.5
parents 00ed39d3 36a113db
This diff is collapsed.
......@@ -22,6 +22,16 @@ config SENSORS_ADM1021
in the lm_sensors package, which you can download at
http://www.lm-sensors.nu
config SENSORS_IT87
tristate " National Semiconductors IT87 and compatibles"
depends on I2C && EXPERIMENTAL
help
The module will be called it87.
You will also need the latest user-space utilties: you can find them
in the lm_sensors package, which you can download at
http://www.lm-sensors.nu
config SENSORS_LM75
tristate " National Semiconductors LM75 and compatibles"
depends on I2C && EXPERIMENTAL
......@@ -66,8 +76,8 @@ config SENSORS_W83781D
config I2C_SENSOR
tristate
default y if SENSORS_ADM1021=y || SENSORS_LM75=y || SENSORS_VIA686A=y || SENSORS_W83781D=y
default m if SENSORS_ADM1021=m || SENSORS_LM75=m || SENSORS_VIA686A=m || SENSORS_W83781D=m
default y if SENSORS_ADM1021=y || SENSORS_IT87=y || SENSORS_LM75=y || SENSORS_VIA686A=y || SENSORS_W83781D=y
default m if SENSORS_ADM1021=m || SENSORS_IT87=m || SENSORS_LM75=m || SENSORS_VIA686A=m || SENSORS_W83781D=m
default n
endmenu
......@@ -3,6 +3,7 @@
#
obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o
obj-$(CONFIG_SENSORS_IT87) += it87.o
obj-$(CONFIG_SENSORS_LM75) += lm75.o
obj-$(CONFIG_SENSORS_VIA686A) += via686a.o
obj-$(CONFIG_SENSORS_W83781D) += w83781d.o
......@@ -39,12 +39,12 @@
#define ADM1021_ALARM_RTEMP_NA 0x04
/* Addresses to scan */
static unsigned short normal_i2c[] = { SENSORS_I2C_END };
static unsigned short normal_i2c[] = { I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { 0x18, 0x1a, 0x29, 0x2b,
0x4c, 0x4e, SENSORS_I2C_END
0x4c, 0x4e, I2C_CLIENT_END
};
static unsigned int normal_isa[] = { SENSORS_ISA_END };
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/* Insmod parameters */
SENSORS_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066);
......@@ -416,128 +416,6 @@ static void adm1021_update_client(struct i2c_client *client)
up(&data->update_lock);
}
/* FIXME, remove these four functions, they are here to verify the sysfs
* conversion is correct, or not */
__attribute__((unused))
static void adm1021_temp(struct i2c_client *client, int operation,
int ctl_name, int *nrels_mag, long *results)
{
struct adm1021_data *data = i2c_get_clientdata(client);
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
adm1021_update_client(client);
results[0] = TEMP_FROM_REG(data->temp_max);
results[1] = TEMP_FROM_REG(data->temp_hyst);
results[2] = TEMP_FROM_REG(data->temp_input);
*nrels_mag = 3;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
if (*nrels_mag >= 1) {
data->temp_max = TEMP_TO_REG(results[0]);
adm1021_write_value(client, ADM1021_REG_TOS_W,
data->temp_max);
}
if (*nrels_mag >= 2) {
data->temp_hyst = TEMP_TO_REG(results[1]);
adm1021_write_value(client, ADM1021_REG_THYST_W,
data->temp_hyst);
}
}
}
__attribute__((unused))
static void adm1021_remote_temp(struct i2c_client *client, int operation,
int ctl_name, int *nrels_mag, long *results)
{
struct adm1021_data *data = i2c_get_clientdata(client);
int prec = 0;
if (operation == SENSORS_PROC_REAL_INFO)
if (data->type == adm1023) { *nrels_mag = 3; }
else { *nrels_mag = 0; }
else if (operation == SENSORS_PROC_REAL_READ) {
adm1021_update_client(client);
results[0] = TEMP_FROM_REG(data->remote_temp_max);
results[1] = TEMP_FROM_REG(data->remote_temp_hyst);
results[2] = TEMP_FROM_REG(data->remote_temp_input);
if (data->type == adm1023) {
results[0] = results[0]*1000 + ((data->remote_temp_os_prec >> 5) * 125);
results[1] = results[1]*1000 + ((data->remote_temp_hyst_prec >> 5) * 125);
results[2] = (TEMP_FROM_REG(data->remote_temp_offset)*1000) + ((data->remote_temp_offset_prec >> 5) * 125);
results[3] = (TEMP_FROM_REG(data->remote_temp_input)*1000) + ((data->remote_temp_prec >> 5) * 125);
*nrels_mag = 4;
} else {
*nrels_mag = 3;
}
} else if (operation == SENSORS_PROC_REAL_WRITE) {
if (*nrels_mag >= 1) {
if (data->type == adm1023) {
prec = ((results[0]-((results[0]/1000)*1000))/125)<<5;
adm1021_write_value(client, ADM1021_REG_REM_TOS_PREC, prec);
results[0] = results[0]/1000;
data->remote_temp_os_prec=prec;
}
data->remote_temp_max = TEMP_TO_REG(results[0]);
adm1021_write_value(client, ADM1021_REG_REMOTE_TOS_W, data->remote_temp_max);
}
if (*nrels_mag >= 2) {
if (data->type == adm1023) {
prec = ((results[1]-((results[1]/1000)*1000))/125)<<5;
adm1021_write_value(client, ADM1021_REG_REM_THYST_PREC, prec);
results[1] = results[1]/1000;
data->remote_temp_hyst_prec=prec;
}
data->remote_temp_hyst = TEMP_TO_REG(results[1]);
adm1021_write_value(client, ADM1021_REG_REMOTE_THYST_W, data->remote_temp_hyst);
}
if (*nrels_mag >= 3) {
if (data->type == adm1023) {
prec = ((results[2]-((results[2]/1000)*1000))/125)<<5;
adm1021_write_value(client, ADM1021_REG_REM_OFFSET_PREC, prec);
results[2]=results[2]/1000;
data->remote_temp_offset_prec=prec;
data->remote_temp_offset=results[2];
adm1021_write_value(client, ADM1021_REG_REM_OFFSET, data->remote_temp_offset);
}
}
}
}
__attribute__((unused))
static void adm1021_die_code(struct i2c_client *client, int operation,
int ctl_name, int *nrels_mag, long *results)
{
struct adm1021_data *data = i2c_get_clientdata(client);
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
adm1021_update_client(client);
results[0] = data->die_code;
*nrels_mag = 1;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
/* Can't write to it */
}
}
__attribute__((unused))
static void adm1021_alarms(struct i2c_client *client, int operation,
int ctl_name, int *nrels_mag, long *results)
{
struct adm1021_data *data = i2c_get_clientdata(client);
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
adm1021_update_client(client);
results[0] = data->alarms;
*nrels_mag = 1;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
/* Can't write to it */
}
}
static int __init sensors_adm1021_init(void)
{
return i2c_add_driver(&adm1021_driver);
......
This diff is collapsed.
......@@ -28,10 +28,10 @@
/* Addresses to scan */
static unsigned short normal_i2c[] = { SENSORS_I2C_END };
static unsigned short normal_i2c_range[] = { 0x48, 0x4f, SENSORS_I2C_END };
static unsigned int normal_isa[] = { SENSORS_ISA_END };
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
static unsigned short normal_i2c[] = { I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { 0x48, 0x4f, I2C_CLIENT_END };
static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/* Insmod parameters */
SENSORS_INSMOD_1(lm75);
......
......@@ -51,10 +51,10 @@ MODULE_PARM_DESC(force_addr,
/* Addresses to scan.
Note that we can't determine the ISA address until we have initialized
our module */
static unsigned short normal_i2c[] = { SENSORS_I2C_END };
static unsigned short normal_i2c_range[] = { SENSORS_I2C_END };
static unsigned int normal_isa[] = { 0x0000, SENSORS_ISA_END };
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
static unsigned short normal_i2c[] = { I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
static unsigned int normal_isa[] = { 0x0000, I2C_CLIENT_ISA_END };
static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/* Insmod parameters */
SENSORS_INSMOD_1(via686a);
......
......@@ -46,14 +46,14 @@
#define W83781D_RT 1
/* Addresses to scan */
static unsigned short normal_i2c[] = { SENSORS_I2C_END };
static unsigned short normal_i2c_range[] = { 0x20, 0x2f, SENSORS_I2C_END };
static unsigned int normal_isa[] = { 0x0290, SENSORS_ISA_END };
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
static unsigned short normal_i2c[] = { I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { 0x20, 0x2f, I2C_CLIENT_END };
static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END };
static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/* Insmod parameters */
SENSORS_INSMOD_6(w83781d, w83782d, w83783s, w83627hf, as99127f, w83697hf);
SENSORS_MODULE_PARM(force_subclients, "List of subclient addresses: "
I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
"{bus, clientaddr, subclientaddr1, subclientaddr2}");
static int init = 1;
......
......@@ -618,8 +618,8 @@ int i2c_control(struct i2c_client *client,
* ----------------------------------------------------
*/
int i2c_probe(struct i2c_adapter *adapter,
struct i2c_client_address_data *address_data,
i2c_client_found_addr_proc *found_proc)
struct i2c_client_address_data *address_data,
int (*found_proc) (struct i2c_adapter *, int, int))
{
int addr,i,found,err;
int adap_id = i2c_adapter_id(adapter);
......@@ -644,7 +644,7 @@ int i2c_probe(struct i2c_adapter *adapter,
(addr == address_data->force[i+1])) {
DEB2(printk(KERN_DEBUG "i2c-core.o: found force parameter for adapter %d, addr %04x\n",
adap_id,addr));
if ((err = found_proc(adapter,addr,0,0)))
if ((err = found_proc(adapter,addr,0)))
return err;
found = 1;
}
......@@ -732,7 +732,7 @@ int i2c_probe(struct i2c_adapter *adapter,
/* OK, so we really should examine this address. First check
whether there is some client here at all! */
if (i2c_smbus_xfer(adapter,addr,0,0,0,I2C_SMBUS_QUICK,NULL) >= 0)
if ((err = found_proc(adapter,addr,0,-1)))
if ((err = found_proc(adapter,addr,-1)))
return err;
}
return 0;
......
......@@ -35,14 +35,14 @@
/* Very inefficient for ISA detects, and won't work for 10-bit addresses! */
int i2c_detect(struct i2c_adapter *adapter,
struct i2c_address_data *address_data,
i2c_found_addr_proc * found_proc)
struct i2c_address_data *address_data,
int (*found_proc) (struct i2c_adapter *, int, int))
{
int addr, i, found, j, err;
struct i2c_force_data *this_force;
int is_isa = i2c_is_isa_adapter(adapter);
int adapter_id =
is_isa ? SENSORS_ISA_BUS : i2c_adapter_id(adapter);
is_isa ? ANY_I2C_ISA_BUS : i2c_adapter_id(adapter);
/* Forget it if we can't probe using SMBUS_QUICK */
if ((!is_isa) &&
......@@ -59,9 +59,9 @@ int i2c_detect(struct i2c_adapter *adapter,
detection at all */
found = 0;
for (i = 0; !found && (this_force = address_data->forces + i, this_force->force); i++) {
for (j = 0; !found && (this_force->force[j] != SENSORS_I2C_END); j += 2) {
for (j = 0; !found && (this_force->force[j] != I2C_CLIENT_END); j += 2) {
if ( ((adapter_id == this_force->force[j]) ||
((this_force->force[j] == SENSORS_ANY_I2C_BUS) && !is_isa)) &&
((this_force->force[j] == ANY_I2C_BUS) && !is_isa)) &&
(addr == this_force->force[j + 1]) ) {
dev_dbg(&adapter->dev, "found force parameter for adapter %d, addr %04x\n", adapter_id, addr);
if ((err = found_proc(adapter, addr, this_force->kind)))
......@@ -75,18 +75,18 @@ int i2c_detect(struct i2c_adapter *adapter,
/* If this address is in one of the ignores, we can forget about it
right now */
for (i = 0; !found && (address_data->ignore[i] != SENSORS_I2C_END); i += 2) {
for (i = 0; !found && (address_data->ignore[i] != I2C_CLIENT_END); i += 2) {
if ( ((adapter_id == address_data->ignore[i]) ||
((address_data->ignore[i] == SENSORS_ANY_I2C_BUS) &&
((address_data->ignore[i] == ANY_I2C_BUS) &&
!is_isa)) &&
(addr == address_data->ignore[i + 1])) {
dev_dbg(&adapter->dev, "found ignore parameter for adapter %d, addr %04x\n", adapter_id, addr);
found = 1;
}
}
for (i = 0; !found && (address_data->ignore_range[i] != SENSORS_I2C_END); i += 3) {
for (i = 0; !found && (address_data->ignore_range[i] != I2C_CLIENT_END); i += 3) {
if ( ((adapter_id == address_data->ignore_range[i]) ||
((address_data-> ignore_range[i] == SENSORS_ANY_I2C_BUS) &
((address_data-> ignore_range[i] == ANY_I2C_BUS) &
!is_isa)) &&
(addr >= address_data->ignore_range[i + 1]) &&
(addr <= address_data->ignore_range[i + 2])) {
......@@ -100,13 +100,13 @@ int i2c_detect(struct i2c_adapter *adapter,
/* Now, we will do a detection, but only if it is in the normal or
probe entries */
if (is_isa) {
for (i = 0; !found && (address_data->normal_isa[i] != SENSORS_ISA_END); i += 1) {
for (i = 0; !found && (address_data->normal_isa[i] != I2C_CLIENT_ISA_END); i += 1) {
if (addr == address_data->normal_isa[i]) {
dev_dbg(&adapter->dev, "found normal isa entry for adapter %d, addr %04x\n", adapter_id, addr);
found = 1;
}
}
for (i = 0; !found && (address_data->normal_isa_range[i] != SENSORS_ISA_END); i += 3) {
for (i = 0; !found && (address_data->normal_isa_range[i] != I2C_CLIENT_ISA_END); i += 3) {
if ((addr >= address_data->normal_isa_range[i]) &&
(addr <= address_data->normal_isa_range[i + 1]) &&
((addr - address_data->normal_isa_range[i]) % address_data->normal_isa_range[i + 2] == 0)) {
......@@ -115,13 +115,13 @@ int i2c_detect(struct i2c_adapter *adapter,
}
}
} else {
for (i = 0; !found && (address_data->normal_i2c[i] != SENSORS_I2C_END); i += 1) {
for (i = 0; !found && (address_data->normal_i2c[i] != I2C_CLIENT_END); i += 1) {
if (addr == address_data->normal_i2c[i]) {
found = 1;
dev_dbg(&adapter->dev, "found normal i2c entry for adapter %d, addr %02x", adapter_id, addr);
}
}
for (i = 0; !found && (address_data->normal_i2c_range[i] != SENSORS_I2C_END); i += 2) {
for (i = 0; !found && (address_data->normal_i2c_range[i] != I2C_CLIENT_END); i += 2) {
if ((addr >= address_data->normal_i2c_range[i]) &&
(addr <= address_data->normal_i2c_range[i + 1])) {
dev_dbg(&adapter->dev, "found normal i2c_range entry for adapter %d, addr %04x\n", adapter_id, addr);
......@@ -131,19 +131,19 @@ int i2c_detect(struct i2c_adapter *adapter,
}
for (i = 0;
!found && (address_data->probe[i] != SENSORS_I2C_END);
!found && (address_data->probe[i] != I2C_CLIENT_END);
i += 2) {
if (((adapter_id == address_data->probe[i]) ||
((address_data->
probe[i] == SENSORS_ANY_I2C_BUS) & !is_isa))
probe[i] == ANY_I2C_BUS) & !is_isa))
&& (addr == address_data->probe[i + 1])) {
dev_dbg(&adapter->dev, "found probe parameter for adapter %d, addr %04x\n", adapter_id, addr);
found = 1;
}
}
for (i = 0; !found && (address_data->probe_range[i] != SENSORS_I2C_END); i += 3) {
for (i = 0; !found && (address_data->probe_range[i] != I2C_CLIENT_END); i += 3) {
if ( ((adapter_id == address_data->probe_range[i]) ||
((address_data->probe_range[i] == SENSORS_ANY_I2C_BUS) & !is_isa)) &&
((address_data->probe_range[i] == ANY_I2C_BUS) & !is_isa)) &&
(addr >= address_data->probe_range[i + 1]) &&
(addr <= address_data->probe_range[i + 2])) {
found = 1;
......@@ -163,20 +163,8 @@ int i2c_detect(struct i2c_adapter *adapter,
return 0;
}
static int __init i2c_sensor_init(void)
{
return 0;
}
static void __exit i2c_sensor_exit(void)
{
}
EXPORT_SYMBOL(i2c_detect);
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
MODULE_DESCRIPTION("i2c-sensor driver");
MODULE_LICENSE("GPL");
module_init(i2c_sensor_init);
module_exit(i2c_sensor_exit);
......@@ -1208,8 +1208,7 @@ static int msp3410d_thread(void *data)
/* ----------------------------------------------------------------------- */
static int msp_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind);
static int msp_attach(struct i2c_adapter *adap, int addr, int kind);
static int msp_detach(struct i2c_client *client);
static int msp_probe(struct i2c_adapter *adap);
static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg);
......@@ -1233,8 +1232,7 @@ static struct i2c_client client_template =
},
};
static int msp_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
{
DECLARE_MUTEX_LOCKED(sem);
struct msp3400c *msp;
......
......@@ -149,7 +149,7 @@ static struct i2c_client_address_data addr_data = {
static struct i2c_client client_template;
static int saa5249_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind)
{
int pgbuf;
int err;
......
......@@ -66,7 +66,7 @@ static struct i2c_client client_template;
/* ----------------------------------------------------------------------- */
static int saa7111_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
static int saa7111_attach(struct i2c_adapter *adap, int addr, int kind)
{
int i;
struct saa7111 *decoder;
......
......@@ -312,8 +312,7 @@ static void do_tda7432_init(struct i2c_client *client)
* i2c interface functions *
* *********************** */
static int tda7432_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct tda7432 *t;
struct i2c_client *client;
......
......@@ -178,7 +178,7 @@ static int tda9840_command(struct i2c_client *client, unsigned int cmd, void* ar
return 0;
}
static int tda9840_detect(struct i2c_adapter *adapter, int address, unsigned short flags, int kind)
static int tda9840_detect(struct i2c_adapter *adapter, int address, int kind)
{
struct i2c_client *client;
int result = 0;
......
......@@ -240,8 +240,7 @@ static int tda9875_checkit(struct i2c_adapter *adap, int addr)
return(0);
}
static int tda9875_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
static int tda9875_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct tda9875 *t;
struct i2c_client *client;
......
......@@ -345,8 +345,7 @@ static int tda9887_configure(struct tda9887 *t)
/* ---------------------------------------------------------------------- */
static int tda9887_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
static int tda9887_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct tda9887 *t;
......
......@@ -55,7 +55,7 @@ static struct i2c_driver driver;
static int tea6415c_id = 0;
/* this function is called by i2c_probe */
static int tea6415c_detect(struct i2c_adapter *adapter, int address, unsigned short flags, int kind)
static int tea6415c_detect(struct i2c_adapter *adapter, int address, int kind)
{
struct i2c_client *client = 0;
int err = 0;
......
......@@ -95,7 +95,7 @@ static int tea6420_switch(struct i2c_client *client, int i, int o, int g)
}
/* this function is called by i2c_probe */
static int tea6420_detect(struct i2c_adapter *adapter, int address, unsigned short flags, int kind)
static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind)
{
struct i2c_client *client;
int err = 0, i = 0;
......
......@@ -114,8 +114,7 @@ set_tv_freq(struct i2c_client *c, int freq)
/* ---------------------------------------------------------------------- */
static int
tuner_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
tuner_attach(struct i2c_adapter *adap, int addr, int kind)
{
static unsigned char buffer[] = { 0x29, 0x32, 0x2a, 0, 0x2b, 0 };
......
......@@ -776,8 +776,7 @@ static void set_radio_freq(struct i2c_client *c, int freq)
/* ---------------------------------------------------------------------- */
static int tuner_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct tuner *t;
struct i2c_client *client;
......
......@@ -1326,8 +1326,7 @@ static struct CHIPDESC chiplist[] = {
/* ---------------------------------------------------------------------- */
/* i2c registration */
static int chip_attach(struct i2c_adapter *adap, int addr,
unsigned short flags, int kind)
static int chip_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct CHIPSTATE *chip;
struct CHIPDESC *desc;
......
This diff is collapsed.
......@@ -290,10 +290,12 @@ struct i2c_client_address_data {
};
/* Internal numbers to terminate lists */
#define I2C_CLIENT_END 0xfffe
#define I2C_CLIENT_END 0xfffe
#define I2C_CLIENT_ISA_END 0xfffefffe
/* The numbers to use to set I2C bus address */
#define ANY_I2C_BUS 0xffff
#define ANY_I2C_BUS 0xffff
#define ANY_I2C_ISA_BUS 9191
/* The length of the option lists */
#define I2C_CLIENT_MAX_OPTS 48
......@@ -338,12 +340,9 @@ extern int i2c_check_addr (struct i2c_adapter *adapter, int addr);
* It will only call found_proc if some client is connected at the
* specific address (unless a 'force' matched);
*/
typedef int i2c_client_found_addr_proc (struct i2c_adapter *adapter,
int addr, unsigned short flags,int kind);
extern int i2c_probe(struct i2c_adapter *adapter,
struct i2c_client_address_data *address_data,
i2c_client_found_addr_proc *found_proc);
int (*found_proc) (struct i2c_adapter *, int, int));
/* An ioctl like call to set div. parameters of the adapter.
*/
......@@ -559,11 +558,15 @@ union i2c_smbus_data {
I2C_CLIENT_MODULE_PARM(force, \
"List of adapter,address pairs to boldly assume " \
"to be present"); \
static struct i2c_client_address_data addr_data = \
{normal_i2c, normal_i2c_range, \
probe, probe_range, \
ignore, ignore_range, \
force}
static struct i2c_client_address_data addr_data = { \
.normal_i2c = normal_i2c, \
.normal_i2c_range = normal_i2c_range, \
.probe = probe, \
.probe_range = probe_range, \
.ignore = ignore, \
.ignore_range = ignore_range, \
.force = force, \
}
/* Detect whether we are on the isa bus. If this returns true, all i2c
access will fail! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment