diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-07-09 19:35:35 +0200 |
---|---|---|
committer | Andi Shyti <andi.shyti@kernel.org> | 2024-07-20 03:07:55 +0200 |
commit | 8f3075cc680c232590ca4e2ef39ebaf1e887a52e (patch) | |
tree | 2490044137c015bd329c4ba4936f2ad972eb7ab8 | |
parent | 45b8ee7182d5ef8df6959297046f86dc128d6a06 (diff) | |
download | linux-8f3075cc680c232590ca4e2ef39ebaf1e887a52e.tar.gz linux-8f3075cc680c232590ca4e2ef39ebaf1e887a52e.tar.bz2 linux-8f3075cc680c232590ca4e2ef39ebaf1e887a52e.zip |
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 <linux@weissschuh.net>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
-rw-r--r-- | drivers/i2c/i2c-smbus.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 1cb137b9181d..7e4203df83ed 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -352,18 +352,11 @@ void i2c_register_spd(struct i2c_adapter *adap) return; /* - * If we're a child adapter on a muxed segment, then limit slots to 8, - * as this is the max number of SPD EEPROMs that can be addressed per bus. + * The max number of SPD EEPROMs that can be addressed per bus is 8. + * If more slots are present either muxed or multiple busses are + * necessary or the additional slots are ignored. */ - if (i2c_parent_is_i2c_adapter(adap)) { - slot_count = 8; - } else { - if (slot_count > 8) { - dev_warn(&adap->dev, - "More than 8 memory slots on a single bus, contact i801 maintainer to add missing mux config\n"); - return; - } - } + slot_count = min(slot_count, 8); /* * Memory types could be found at section 7.18.2 (Memory Device — Type), table 78 |