diff options
author | Jean Delvare <jdelvare@suse.de> | 2020-03-16 11:22:24 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-05-29 12:53:04 +0200 |
commit | 5ace60859e84113b7a185c117fbf2c429d381b59 (patch) | |
tree | 4bcd045639cc5f05b03cc3e88c6e1d0738468af8 /include | |
parent | 7df915e540ec51ce9ac5f2d2d9801d0356b617da (diff) | |
download | linux-5ace60859e84113b7a185c117fbf2c429d381b59.tar.bz2 |
i2c: smbus: Add a way to instantiate SPD EEPROMs automatically
In simple cases we can instantiate SPD EEPROMs on the SMBus
automatically. Start with just DDR2, DDR3 and DDR4 on x86 for now,
and only for systems with no more than 4 memory slots. These
limitations may be lifted later.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
[wsa: minor change for new API]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c-smbus.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h index 8c5459034f92..1e4e0de4ef8b 100644 --- a/include/linux/i2c-smbus.h +++ b/include/linux/i2c-smbus.h @@ -2,7 +2,7 @@ /* * i2c-smbus.h - SMBus extensions to the I2C protocol * - * Copyright (C) 2010 Jean Delvare <jdelvare@suse.de> + * Copyright (C) 2010-2019 Jean Delvare <jdelvare@suse.de> */ #ifndef _LINUX_I2C_SMBUS_H @@ -39,4 +39,10 @@ static inline int of_i2c_setup_smbus_alert(struct i2c_adapter *adap) } #endif +#if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_DMI) +void i2c_register_spd(struct i2c_adapter *adap); +#else +static inline void i2c_register_spd(struct i2c_adapter *adap) { } +#endif + #endif /* _LINUX_I2C_SMBUS_H */ |