From 5e180e6f6ac9892b15870d43741c47f2cd4dbe6e Mon Sep 17 00:00:00 2001 From: Vadym Kochan Date: Wed, 16 Sep 2020 20:09:32 +0300 Subject: [PATCH] eeprom: at25: 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 Link: https://lore.kernel.org/r/20200916170933.20302-3-vadym.kochan@plvision.eu Signed-off-by: Greg Kroah-Hartman --- drivers/misc/eeprom/at25.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index ce092846034f..3b7d8b7584f4 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -348,6 +348,7 @@ static int at25_probe(struct spi_device *spi) spi_set_drvdata(spi, at25); at25->addrlen = addrlen; + at25->nvmem_config.type = NVMEM_TYPE_EEPROM; at25->nvmem_config.name = dev_name(&spi->dev); at25->nvmem_config.dev = &spi->dev; at25->nvmem_config.read_only = chip.flags & EE_READONLY; -- GitLab