diff mbox series

[2/2] i2c: i801: Instantiate SPD EEPROMs automatically

Message ID 20200316112448.073eecf6@endymion
State New
Headers show
Series [1/2] i2c: smbus: Add a way to instantiate SPD EEPROMs automatically | expand

Commit Message

Jean Delvare March 16, 2020, 10:24 a.m. UTC
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>
Cc: Wolfram Sang <wsa@the-dreams.de> 
---
 drivers/i2c/busses/i2c-i801.c |    6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

--- linux-5.5.orig/drivers/i2c/busses/i2c-i801.c	2020-03-16 11:11:57.463497502 +0100
+++ linux-5.5/drivers/i2c/busses/i2c-i801.c	2020-03-16 11:14:33.279262494 +0100
@@ -1318,6 +1318,12 @@  static void i801_probe_optional_slaves(s
 
 	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) {}