Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

eeprom: make older eeprom drivers select NVMEM_SYSFS

misc/eeprom/{at24,at25,eeprom_93xx46} drivers all register their
corresponding devices in the nvmem framework in compat mode which requires
nvmem sysfs interface to be present. The latter, however, has been split
out from nvmem under a separate Kconfig in commit ae0c2d725512 ("nvmem:
core: add NVMEM_SYSFS Kconfig"). As a result, probing certain I2C-attached
EEPROMs now fails with

at24: probe of 0-0050 failed with error -38

because of a stub implementation of nvmem_sysfs_setup_compat()
in drivers/nvmem/nvmem.h. Update the nvmem dependency for these drivers
so they could load again:

at24 0-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write

Cc: Adrian Bunk <bunk@kernel.org>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
Link: https://lore.kernel.org/r/20190716111236.27803-1-asolokha@kb.kras.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arseny Solokha and committed by
Greg Kroah-Hartman
1b562183 10b0f1c2

+3
+3
drivers/misc/eeprom/Kconfig
··· 5 5 tristate "I2C EEPROMs / RAMs / ROMs from most vendors" 6 6 depends on I2C && SYSFS 7 7 select NVMEM 8 + select NVMEM_SYSFS 8 9 select REGMAP_I2C 9 10 help 10 11 Enable this driver to get read/write support to most I2C EEPROMs ··· 35 34 tristate "SPI EEPROMs from most vendors" 36 35 depends on SPI && SYSFS 37 36 select NVMEM 37 + select NVMEM_SYSFS 38 38 help 39 39 Enable this driver to get read/write support to most SPI EEPROMs, 40 40 after you configure the board init code to know about each eeprom ··· 82 80 depends on SPI && SYSFS 83 81 select REGMAP 84 82 select NVMEM 83 + select NVMEM_SYSFS 85 84 help 86 85 Driver for the microwire EEPROM chipsets 93xx46x. The driver 87 86 supports both read and write commands and also the command to