i2c: smbus: Prepare i2c_register_spd for usage on muxed segments
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 2 Mar 2024 20:39:13 +0000 (21:39 +0100)
committerWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 4 Mar 2024 20:44:56 +0000 (21:44 +0100)
commit8821c8376993c271a77d241a4e657099f7400974
tree7de5637244aa1d46a7cf25abbe15e5d114be1fbf
parenteb52034436a58e742ceea0dcf2f003f83a3449a5
i2c: smbus: Prepare i2c_register_spd for usage on muxed segments

If this is an adapter on a muxed bus segment, assume that each segment
is connected to a subset of the (> 8) overall memory slots. In this
case let's probe the maximum of 8 slots, however stop if the number
of overall populated slots is reached.

If we're not on a muxed segment and the total number of slots is > 8,
then warn because then not all SPD eeproms can be addressed.
Presumably the bus is muxed, but the mux config is missing.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
[wsa: removed a superfluous printout]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/i2c/i2c-smbus.c