Skip to content

Commit c37f8ef

Browse files
committed
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()
2 parents 57d88e8 + 637f33a commit c37f8ef

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed

drivers/i2c/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ config I2C_MUX
7272
source "drivers/i2c/muxes/Kconfig"
7373

7474
config I2C_ATR
75-
tristate "I2C Address Translator (ATR) support"
75+
tristate "I2C Address Translator (ATR) support" if COMPILE_TEST
7676
help
7777
Enable support for I2C Address Translator (ATR) chips.
7878

drivers/i2c/busses/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,10 +1384,10 @@ config I2C_ICY
13841384

13851385
config I2C_MLXCPLD
13861386
tristate "Mellanox I2C driver"
1387-
depends on X86_64 || ARM64 || COMPILE_TEST
1387+
depends on X86_64 || (ARM64 && ACPI) || COMPILE_TEST
13881388
help
13891389
This exposes the Mellanox platform I2C busses to the linux I2C layer
1390-
for X86 based systems.
1390+
for X86 and ARM64/ACPI based systems.
13911391
Controller is implemented as CPLD logic.
13921392

13931393
This driver can also be built as a module. If so, the module will be

drivers/i2c/busses/i2c-aspeed.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,13 +698,16 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
698698

699699
if (time_left == 0) {
700700
/*
701-
* If timed out and bus is still busy in a multi master
702-
* environment, attempt recovery at here.
701+
* In a multi-master setup, if a timeout occurs, attempt
702+
* recovery. But if the bus is idle, we still need to reset the
703+
* i2c controller to clear the remaining interrupts.
703704
*/
704705
if (bus->multi_master &&
705706
(readl(bus->base + ASPEED_I2C_CMD_REG) &
706707
ASPEED_I2CD_BUS_BUSY_STS))
707708
aspeed_i2c_recover_bus(bus);
709+
else
710+
aspeed_i2c_reset(bus);
708711

709712
/*
710713
* If timed out and the state is still pending, drop the pending

drivers/i2c/busses/i2c-cadence.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ enum cdns_i2c_slave_state {
182182
* @reset: Reset control for the device
183183
* @quirks: flag for broken hold bit usage in r1p10
184184
* @ctrl_reg: Cached value of the control register.
185+
* @rinfo: I2C GPIO recovery information
185186
* @ctrl_reg_diva_divb: value of fields DIV_A and DIV_B from CR register
186187
* @slave: Registered slave instance.
187188
* @dev_mode: I2C operating role(master/slave).

drivers/w1/masters/ds2482.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static struct i2c_driver ds2482_driver = {
551551
.driver = {
552552
.name = "ds2482",
553553
},
554-
.probe_new = ds2482_probe,
554+
.probe = ds2482_probe,
555555
.remove = ds2482_remove,
556556
.id_table = ds2482_id,
557557
};

include/linux/i2c.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ enum i2c_driver_flags {
237237
* struct i2c_driver - represent an I2C device driver
238238
* @class: What kind of i2c device we instantiate (for detect)
239239
* @probe: Callback for device binding
240-
* @probe_new: Transitional callback for device binding - do not use
241240
* @remove: Callback for device unbinding
242241
* @shutdown: Callback for device shutdown
243242
* @alert: Alert callback, for example for the SMBus alert protocol
@@ -272,16 +271,8 @@ enum i2c_driver_flags {
272271
struct i2c_driver {
273272
unsigned int class;
274273

275-
union {
276274
/* Standard driver model interfaces */
277-
int (*probe)(struct i2c_client *client);
278-
/*
279-
* Legacy callback that was part of a conversion of .probe().
280-
* Today it has the same semantic as .probe(). Don't use for new
281-
* code.
282-
*/
283-
int (*probe_new)(struct i2c_client *client);
284-
};
275+
int (*probe)(struct i2c_client *client);
285276
void (*remove)(struct i2c_client *client);
286277

287278

0 commit comments

Comments
 (0)