i2c: i801: Instantiate SPD EEPROMs automatically
authorJean Delvare <jdelvare@suse.de>
Mon, 16 Mar 2020 10:24:48 +0000 (11:24 +0100)
committerWolfram Sang <wsa@kernel.org>
Fri, 29 May 2020 10:55:47 +0000 (12:55 +0200)
Call the function to instantiate SPD EEPROMs automatically on the
main SMBus controller.

Multiplexed SMBus systems are excluded for now as they are more
complex to handle.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c

index 4f33388..fea6449 100644 (file)
@@ -1318,6 +1318,12 @@ static void i801_probe_optional_slaves(struct i801_priv *priv)
 
        if (is_dell_system_with_lis3lv02d())
                register_dell_lis3lv02d_i2c_device(priv);
+
+       /* Instantiate SPD EEPROMs unless the SMBus is multiplexed */
+#if IS_ENABLED(CONFIG_I2C_MUX_GPIO)
+       if (!priv->mux_drvdata)
+#endif
+               i2c_register_spd(&priv->adapter);
 }
 #else
 static void __init input_apanel_init(void) {}