summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2020-03-16 11:24:48 +0100
committerWolfram Sang <wsa@kernel.org>2020-05-29 12:55:47 +0200
commit01590f361e94a01e9b9868fa81d4079d255c681f (patch)
tree335d1c502da9e690eda5bef1dcbcc6f93a3774c0 /drivers/i2c
parent5ace60859e84113b7a185c117fbf2c429d381b59 (diff)
downloadlinux-01590f361e94a01e9b9868fa81d4079d255c681f.tar.bz2
i2c: i801: Instantiate SPD EEPROMs automatically
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-i801.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 4f333889489c..fea644921a76 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -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) {}