Skip to content

Commit

Permalink
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Remove all i2c_set_clientdata(client, NULL) in drivers
  i2c/busses: Move two drivers to embedded section
  i2c: Rename i2c_check_addr to i2c_check_addr_busy
  i2c: Document reserved I2C addresses
  i2c: Check for address validity on client registration
  i2c: Share the I2C device presence detection code
  Documentation/i2c: Checkpatch cleanup
  • Loading branch information
torvalds committed Jun 3, 2010
2 parents 95619be + fbae3fb commit ceadda0
Show file tree
Hide file tree
Showing 85 changed files with 191 additions and 287 deletions.
4 changes: 2 additions & 2 deletions Documentation/i2c/busses/i2c-ali1535
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Supported adapters:
http://www.ali.com.tw/eng/support/datasheet_request.php

Authors:
Frodo Looijaard <[email protected]>,
Frodo Looijaard <[email protected]>,
Philip Edelbrock <[email protected]>,
Mark D. Studebaker <[email protected]>,
Dan Eaton <[email protected]>,
Stephen Rousset<[email protected]>

Description
-----------

Expand Down
2 changes: 1 addition & 1 deletion Documentation/i2c/busses/i2c-ali1563
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For an overview of these chips see http://www.acerlabs.com
The M1563 southbridge is deceptively similar to the M1533, with a few
notable exceptions. One of those happens to be the fact they upgraded the
i2c core to be SMBus 2.0 compliant, and happens to be almost identical to
the i2c controller found in the Intel 801 south bridges.
the i2c controller found in the Intel 801 south bridges.

Features
--------
Expand Down
16 changes: 8 additions & 8 deletions Documentation/i2c/busses/i2c-ali15x3
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Supported adapters:
http://www.ali.com.tw/eng/support/datasheet_request.php

Authors:
Frodo Looijaard <[email protected]>,
Philip Edelbrock <[email protected]>,
Frodo Looijaard <[email protected]>,
Philip Edelbrock <[email protected]>,
Mark D. Studebaker <[email protected]>

Module Parameters
Expand Down Expand Up @@ -40,10 +40,10 @@ M1541 and M1543C South Bridges.
The M1543C is a South bridge for desktop systems.
The M1541 is a South bridge for portable systems.
They are part of the following ALI chipsets:
* "Aladdin Pro 2" includes the M1621 Slot 1 North bridge with AGP and

* "Aladdin Pro 2" includes the M1621 Slot 1 North bridge with AGP and
100MHz CPU Front Side bus
* "Aladdin V" includes the M1541 Socket 7 North bridge with AGP and 100MHz
* "Aladdin V" includes the M1541 Socket 7 North bridge with AGP and 100MHz
CPU Front Side bus
Some Aladdin V motherboards:
Asus P5A
Expand Down Expand Up @@ -77,7 +77,7 @@ output of lspci will show something similar to the following:
** then run lspci.
** If you see the 1533 and 5229 devices but NOT the 7101 device,
** then you must enable ACPI, the PMU, SMB, or something similar
** in the BIOS.
** in the BIOS.
** The driver won't work if it can't find the M7101 device.

The SMB controller is part of the M7101 device, which is an ACPI-compliant
Expand All @@ -87,8 +87,8 @@ The whole M7101 device has to be enabled for the SMB to work. You can't
just enable the SMB alone. The SMB and the ACPI have separate I/O spaces.
We make sure that the SMB is enabled. We leave the ACPI alone.

Features
--------
Features
--------

This driver controls the SMB Host only. The SMB Slave
controller on the M15X3 is not enabled. This driver does not use
Expand Down
14 changes: 7 additions & 7 deletions Documentation/i2c/busses/i2c-pca-isa
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Kernel driver i2c-pca-isa

Supported adapters:
This driver supports ISA boards using the Philips PCA 9564
Parallel bus to I2C bus controller
This driver supports ISA boards using the Philips PCA 9564
Parallel bus to I2C bus controller

Author: Ian Campbell <[email protected]>, Arcom Control Systems
Author: Ian Campbell <[email protected]>, Arcom Control Systems

Module Parameters
-----------------

* base int
I/O base address
* irq int
IRQ interrupt
* clock int
IRQ interrupt
* clock int
Clock rate as described in table 1 of PCA9564 datasheet

Description
-----------

This driver supports ISA boards using the Philips PCA 9564
Parallel bus to I2C bus controller
This driver supports ISA boards using the Philips PCA 9564
Parallel bus to I2C bus controller
58 changes: 29 additions & 29 deletions Documentation/i2c/busses/i2c-sis5595
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
Kernel driver i2c-sis5595

Authors:
Authors:
Frodo Looijaard <[email protected]>,
Mark D. Studebaker <[email protected]>,
Philip Edelbrock <[email protected]>
Philip Edelbrock <[email protected]>

Supported adapters:
* Silicon Integrated Systems Corp. SiS5595 Southbridge
Datasheet: Publicly available at the Silicon Integrated Systems Corp. site.

Note: all have mfr. ID 0x1039.

SUPPORTED PCI ID
5595 0008
Note: these chips contain a 0008 device which is incompatible with the
5595. We recognize these by the presence of the listed
"blacklist" PCI ID and refuse to load.
NOT SUPPORTED PCI ID BLACKLIST PCI ID
540 0008 0540
550 0008 0550
5513 0008 5511
5581 0008 5597
5582 0008 5597
5597 0008 5597
5598 0008 5597/5598
630 0008 0630
645 0008 0645
646 0008 0646
648 0008 0648
650 0008 0650
651 0008 0651
730 0008 0730
735 0008 0735
745 0008 0745
746 0008 0746
Note: all have mfr. ID 0x1039.

SUPPORTED PCI ID
5595 0008

Note: these chips contain a 0008 device which is incompatible with the
5595. We recognize these by the presence of the listed
"blacklist" PCI ID and refuse to load.

NOT SUPPORTED PCI ID BLACKLIST PCI ID
540 0008 0540
550 0008 0550
5513 0008 5511
5581 0008 5597
5582 0008 5597
5597 0008 5597
5598 0008 5597/5598
630 0008 0630
645 0008 0645
646 0008 0646
648 0008 0648
650 0008 0650
651 0008 0651
730 0008 0730
735 0008 0735
745 0008 0745
746 0008 0746

Module Parameters
-----------------
Expand Down
8 changes: 4 additions & 4 deletions Documentation/i2c/busses/i2c-sis630
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Module Parameters
* force = [1|0] Forcibly enable the SIS630. DANGEROUS!
This can be interesting for chipsets not named
above to check if it works for you chipset, but DANGEROUS!
* high_clock = [1|0] Forcibly set Host Master Clock to 56KHz (default,
what your BIOS use). DANGEROUS! This should be a bit

* high_clock = [1|0] Forcibly set Host Master Clock to 56KHz (default,
what your BIOS use). DANGEROUS! This should be a bit
faster, but freeze some systems (i.e. my Laptop).


Expand Down Expand Up @@ -44,6 +44,6 @@ Philip Edelbrock <[email protected]>
- testing SiS730 support
Mark M. Hoffman <[email protected]>
- bug fixes

To anyone else which I forgot here ;), thanks!

6 changes: 3 additions & 3 deletions Documentation/i2c/ten-bit-addresses
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
The I2C protocol knows about two kinds of device addresses: normal 7 bit
The I2C protocol knows about two kinds of device addresses: normal 7 bit
addresses, and an extended set of 10 bit addresses. The sets of addresses
do not intersect: the 7 bit address 0x10 is not the same as the 10 bit
address 0x10 (though a single device could respond to both of them). You
select a 10 bit address by adding an extra byte after the address
byte:
S Addr7 Rd/Wr ....
S Addr7 Rd/Wr ....
becomes
S 11110 Addr10 Rd/Wr
S is the start bit, Rd/Wr the read/write bit, and if you count the number
of bits, you will see the there are 8 after the S bit for 7 bit addresses,
and 16 after the S bit for 10 bit addresses.

WARNING! The current 10 bit address support is EXPERIMENTAL. There are
WARNING! The current 10 bit address support is EXPERIMENTAL. There are
several places in the code that will cause SEVERE PROBLEMS with 10 bit
addresses, even though there is some basic handling and hooks. Also,
almost no supported adapter handles the 10 bit addresses correctly.
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/adt7411.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ static int __devinit adt7411_probe(struct i2c_client *client,
exit_remove:
sysfs_remove_group(&client->dev.kobj, &adt7411_attr_grp);
exit_free:
i2c_set_clientdata(client, NULL);
kfree(data);
return ret;
}
Expand All @@ -327,7 +326,6 @@ static int __devexit adt7411_remove(struct i2c_client *client)

hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &adt7411_attr_grp);
i2c_set_clientdata(client, NULL);
kfree(data);
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/asc7621.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,6 @@ asc7621_probe(struct i2c_client *client, const struct i2c_device_id *id)
&(asc7621_params[i].sda.dev_attr));
}

i2c_set_clientdata(client, NULL);
kfree(data);
return err;
}
Expand Down Expand Up @@ -1196,7 +1195,6 @@ static int asc7621_remove(struct i2c_client *client)
&(asc7621_params[i].sda.dev_attr));
}

i2c_set_clientdata(client, NULL);
kfree(data);
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,6 @@ static int f75375_probe(struct i2c_client *client,
sysfs_remove_group(&client->dev.kobj, &f75375_group);
exit_free:
kfree(data);
i2c_set_clientdata(client, NULL);
return err;
}

Expand All @@ -672,7 +671,6 @@ static int f75375_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &f75375_group);
kfree(data);
i2c_set_clientdata(client, NULL);
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/g760a.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ static int g760a_probe(struct i2c_client *client,
sysfs_remove_group(&client->dev.kobj, &g760a_group);
error_sysfs_create_group:
kfree(data);
i2c_set_clientdata(client, NULL);

return err;
}
Expand All @@ -247,7 +246,6 @@ static int g760a_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &g760a_group);
kfree(data);
i2c_set_clientdata(client, NULL);

return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/hwmon/lm73.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ static int lm73_remove(struct i2c_client *client)

hwmon_device_unregister(hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &lm73_group);
i2c_set_clientdata(client, NULL);
return 0;
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
exit_remove:
sysfs_remove_group(&client->dev.kobj, &lm75_group);
exit_free:
i2c_set_clientdata(client, NULL);
kfree(data);
return status;
}
Expand All @@ -204,7 +203,6 @@ static int lm75_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &lm75_group);
lm75_write_value(client, LM75_REG_CONF, data->orig_conf);
i2c_set_clientdata(client, NULL);
kfree(data);
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/hwmon/lm95241.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ static int lm95241_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &lm95241_group);

i2c_set_clientdata(client, NULL);
kfree(data);
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/tmp102.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ static int __devinit tmp102_probe(struct i2c_client *client,
fail_restore_config:
tmp102_write_reg(client, TMP102_CONF_REG, tmp102->config_orig);
fail_free:
i2c_set_clientdata(client, NULL);
kfree(tmp102);

return status;
Expand All @@ -247,7 +246,6 @@ static int __devexit tmp102_remove(struct i2c_client *client)
config | TMP102_CONF_SD);
}

i2c_set_clientdata(client, NULL);
kfree(tmp102);

return 0;
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/tmp421.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ static int tmp421_probe(struct i2c_client *client,
sysfs_remove_group(&client->dev.kobj, &tmp421_group);

exit_free:
i2c_set_clientdata(client, NULL);
kfree(data);

return err;
Expand All @@ -308,7 +307,6 @@ static int tmp421_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&client->dev.kobj, &tmp421_group);

i2c_set_clientdata(client, NULL);
kfree(data);

return 0;
Expand Down
2 changes: 0 additions & 2 deletions drivers/hwmon/w83781d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,6 @@ w83781d_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (data->lm75[1])
i2c_unregister_device(data->lm75[1]);
ERROR3:
i2c_set_clientdata(client, NULL);
kfree(data);
ERROR1:
return err;
Expand All @@ -1219,7 +1218,6 @@ w83781d_remove(struct i2c_client *client)
if (data->lm75[1])
i2c_unregister_device(data->lm75[1]);

i2c_set_clientdata(client, NULL);
kfree(data);

return 0;
Expand Down
Loading

0 comments on commit ceadda0

Please sign in to comment.