Skip to content

Commit 8f3075c

Browse files
t-8chAndi Shyti
authored andcommitted
i2c: smbus: remove i801 assumptions from SPD probing
The check and warning are very specific to the SPD usage of the i801 driver. That was fine as long as i801 was the only caller of i2c_register_spd(). Now that piix4 will be added as another user of that function, the check and warning are not accurate anymore. Instead of introducing a more complicated calling protocol only to print a warning, drop the warning. Even in cases where not all slots can be probed, then at least probe the 8 slots that can be. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Heiner Kallweit <[email protected]> Signed-off-by: Andi Shyti <[email protected]>
1 parent 45b8ee7 commit 8f3075c

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/i2c/i2c-smbus.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -352,18 +352,11 @@ void i2c_register_spd(struct i2c_adapter *adap)
352352
return;
353353

354354
/*
355-
* If we're a child adapter on a muxed segment, then limit slots to 8,
356-
* as this is the max number of SPD EEPROMs that can be addressed per bus.
355+
* The max number of SPD EEPROMs that can be addressed per bus is 8.
356+
* If more slots are present either muxed or multiple busses are
357+
* necessary or the additional slots are ignored.
357358
*/
358-
if (i2c_parent_is_i2c_adapter(adap)) {
359-
slot_count = 8;
360-
} else {
361-
if (slot_count > 8) {
362-
dev_warn(&adap->dev,
363-
"More than 8 memory slots on a single bus, contact i801 maintainer to add missing mux config\n");
364-
return;
365-
}
366-
}
359+
slot_count = min(slot_count, 8);
367360

368361
/*
369362
* Memory types could be found at section 7.18.2 (Memory Device — Type), table 78

0 commit comments

Comments
 (0)