Main thing is the removal of 'probe_new' because all i2c client drivers

are converted now. Thanks Uwe, this marks the end of a long conversion
 process. Other than that, we have a few Kconfig updates and driver
 bugfixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmUFekwACgkQFA3kzBSg
 Kbbuag//WWvlEdixGIHwjiToGm4zvpVdV5txr2L1p1xWdXSrXtCVUifgvg6tTFj8
 04hyuEP0c8ml90ZpBb6AMSggNGN09UdaMqb+dj52XBFbqsFOyCjXjy8bHOWZjJ5C
 /3N9/qUpDW4aJ3IBSQgLp+tcW+r6ulGa7KmZGazKkKSLiDIsqS4UicgEzLCA0Wig
 Zidy7Eaq6oo+nGtZH8UOava+o4P9nIrKRf/ILyXK8amFat0rTD1eT+fc7TvI5iC7
 cZ5oFCAsaL1Jz7LNQxiCEQmQWBZOpyUbQlOfT2MCMNhWJG0x6FpF1cYqHHarNEJh
 UDxGQHG0Dj+AHtuZ4D4qAMxFlEYTVVNVNhSea02mxlqcOfbvvC73YfHAZIUsNdPt
 wStg+eSJjHAt/omqzOTTLEJAYnCWvjxc6+7/PN0HjLAipaR/KH1p67mCPKx5y/lt
 +OhvOS2eOpHWwiE9OZZCARqX5HlDJpGpK4TFy2rMOJvKnvYSzkHOd7Zy6Q9gRCW7
 vVeJb1h1tI10RAufk8Rxfp3g8UiAFF8F1rxjDAgmMpGVTqM+TIM5Z2/b2vZdNU1R
 g1mta5OtDzVILs1uwkzS/opSsGvm0e4kDDREyb0spZusi6GZbni89+u93AXhCnkl
 UVmnz65CvQ7eiE9RGLXnsAIIgDdiO7JOAS2ALzK8/lPs8eXs3fU=
 =hFC5
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "The main thing is the removal of 'probe_new' because all i2c client
  drivers are converted now. Thanks Uwe, this marks the end of a long
  conversion process.

  Other than that, we have a few Kconfig updates and driver bugfixes"

* tag 'i2c-for-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: cadence: Fix the kernel-doc warnings
  i2c: aspeed: Reset the i2c controller when timeout occurs
  i2c: I2C_MLXCPLD on ARM64 should depend on ACPI
  i2c: Make I2C_ATR invisible
  i2c: Drop legacy callback .probe_new()
  w1: ds2482: Switch back to use struct i2c_driver's .probe()
This commit is contained in:
Linus Torvalds 2023-09-16 11:09:18 -07:00
commit c37f8efcbc
6 changed files with 11 additions and 16 deletions

View file

@ -72,7 +72,7 @@ config I2C_MUX
source "drivers/i2c/muxes/Kconfig" source "drivers/i2c/muxes/Kconfig"
config I2C_ATR config I2C_ATR
tristate "I2C Address Translator (ATR) support" tristate "I2C Address Translator (ATR) support" if COMPILE_TEST
help help
Enable support for I2C Address Translator (ATR) chips. Enable support for I2C Address Translator (ATR) chips.

View file

@ -1384,10 +1384,10 @@ config I2C_ICY
config I2C_MLXCPLD config I2C_MLXCPLD
tristate "Mellanox I2C driver" tristate "Mellanox I2C driver"
depends on X86_64 || ARM64 || COMPILE_TEST depends on X86_64 || (ARM64 && ACPI) || COMPILE_TEST
help help
This exposes the Mellanox platform I2C busses to the linux I2C layer This exposes the Mellanox platform I2C busses to the linux I2C layer
for X86 based systems. for X86 and ARM64/ACPI based systems.
Controller is implemented as CPLD logic. Controller is implemented as CPLD logic.
This driver can also be built as a module. If so, the module will be This driver can also be built as a module. If so, the module will be

View file

@ -698,13 +698,16 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
if (time_left == 0) { if (time_left == 0) {
/* /*
* If timed out and bus is still busy in a multi master * In a multi-master setup, if a timeout occurs, attempt
* environment, attempt recovery at here. * recovery. But if the bus is idle, we still need to reset the
* i2c controller to clear the remaining interrupts.
*/ */
if (bus->multi_master && if (bus->multi_master &&
(readl(bus->base + ASPEED_I2C_CMD_REG) & (readl(bus->base + ASPEED_I2C_CMD_REG) &
ASPEED_I2CD_BUS_BUSY_STS)) ASPEED_I2CD_BUS_BUSY_STS))
aspeed_i2c_recover_bus(bus); aspeed_i2c_recover_bus(bus);
else
aspeed_i2c_reset(bus);
/* /*
* If timed out and the state is still pending, drop the pending * If timed out and the state is still pending, drop the pending

View file

@ -182,6 +182,7 @@ enum cdns_i2c_slave_state {
* @reset: Reset control for the device * @reset: Reset control for the device
* @quirks: flag for broken hold bit usage in r1p10 * @quirks: flag for broken hold bit usage in r1p10
* @ctrl_reg: Cached value of the control register. * @ctrl_reg: Cached value of the control register.
* @rinfo: I2C GPIO recovery information
* @ctrl_reg_diva_divb: value of fields DIV_A and DIV_B from CR register * @ctrl_reg_diva_divb: value of fields DIV_A and DIV_B from CR register
* @slave: Registered slave instance. * @slave: Registered slave instance.
* @dev_mode: I2C operating role(master/slave). * @dev_mode: I2C operating role(master/slave).

View file

@ -551,7 +551,7 @@ static struct i2c_driver ds2482_driver = {
.driver = { .driver = {
.name = "ds2482", .name = "ds2482",
}, },
.probe_new = ds2482_probe, .probe = ds2482_probe,
.remove = ds2482_remove, .remove = ds2482_remove,
.id_table = ds2482_id, .id_table = ds2482_id,
}; };

View file

@ -237,7 +237,6 @@ enum i2c_driver_flags {
* struct i2c_driver - represent an I2C device driver * struct i2c_driver - represent an I2C device driver
* @class: What kind of i2c device we instantiate (for detect) * @class: What kind of i2c device we instantiate (for detect)
* @probe: Callback for device binding * @probe: Callback for device binding
* @probe_new: Transitional callback for device binding - do not use
* @remove: Callback for device unbinding * @remove: Callback for device unbinding
* @shutdown: Callback for device shutdown * @shutdown: Callback for device shutdown
* @alert: Alert callback, for example for the SMBus alert protocol * @alert: Alert callback, for example for the SMBus alert protocol
@ -272,16 +271,8 @@ enum i2c_driver_flags {
struct i2c_driver { struct i2c_driver {
unsigned int class; unsigned int class;
union {
/* Standard driver model interfaces */ /* Standard driver model interfaces */
int (*probe)(struct i2c_client *client); int (*probe)(struct i2c_client *client);
/*
* Legacy callback that was part of a conversion of .probe().
* Today it has the same semantic as .probe(). Don't use for new
* code.
*/
int (*probe_new)(struct i2c_client *client);
};
void (*remove)(struct i2c_client *client); void (*remove)(struct i2c_client *client);