]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
eeprom: at25: set type id as EEPROM
authorVadym Kochan <vadym.kochan@plvision.eu>
Wed, 16 Sep 2020 17:09:32 +0000 (20:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 16:47:20 +0000 (18:47 +0200)
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-3-vadym.kochan@plvision.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/at25.c

index ce092846034faa6c822f82a1ab9874e750dadea7..3b7d8b7584f4d79714a99fa63197c1bc9facacf8 100644 (file)
@@ -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;