eeprom: at24: Support custom device names for AT24 EEPROMs
authorJon Hunter <jonathanh@nvidia.com>
Thu, 24 Sep 2020 13:20:39 +0000 (15:20 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 25 Sep 2020 13:33:04 +0000 (15:33 +0200)
commit61f764c307f6b2079b7af0d4fb7951402b824967
treeadfa20b5c14e55ea377e64bbb346ee480632d105
parent412b7a521c3094cc0d664dd20d114c717df89896
eeprom: at24: Support custom device names for AT24 EEPROMs

By using the label property, a more descriptive name can be populated
for AT24 EEPROMs NVMEM device. Update the AT24 driver to check to see
if the label property is present and if so, use this as the name for
NVMEM device. Please note that when the 'label' property is present for
the AT24 EEPROM, we do not want the NVMEM driver to append the 'devid'
to the name and so the nvmem_config.id is initialised to
NVMEM_DEVID_NONE.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/misc/eeprom/at24.c