aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom
diff options
context:
space:
mode:
authorVadym Kochan2020-09-16 20:09:33 +0300
committerGreg Kroah-Hartman2020-09-17 18:47:22 +0200
commit1d62a2cedfb58d27718f266da4b35f8367969836 (patch)
tree97b5cdb74fde7dbe6cee9659e9c7a840f7c53cc8 /drivers/misc/eeprom
parent5e180e6f6ac9892b15870d43741c47f2cd4dbe6e (diff)
eeprom: 93xx46: set type id as EEPROM
Set type as NVMEM_TYPE_EEPROM to expose this info via sysfs: $ cat /sys/bus/nvmem/devices/{DEVICE}/type EEPROM Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu> Link: https://lore.kernel.org/r/20200916170933.20302-4-vadym.kochan@plvision.eu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r--drivers/misc/eeprom/eeprom_93xx46.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c
index 94cfb675fe4e..7c45f82b4302 100644
--- a/drivers/misc/eeprom/eeprom_93xx46.c
+++ b/drivers/misc/eeprom/eeprom_93xx46.c
@@ -455,6 +455,7 @@ static int eeprom_93xx46_probe(struct spi_device *spi)
edev->pdata = pd;
edev->size = 128;
+ edev->nvmem_config.type = NVMEM_TYPE_EEPROM;
edev->nvmem_config.name = dev_name(&spi->dev);
edev->nvmem_config.dev = &spi->dev;
edev->nvmem_config.read_only = pd->flags & EE_READONLY;