diff options
author | Vadym Kochan <vadym.kochan@plvision.eu> | 2020-09-16 20:09:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-17 18:47:20 +0200 |
commit | 5e180e6f6ac9892b15870d43741c47f2cd4dbe6e (patch) | |
tree | e8be8cfe66157b708a8594721e601a050d8d3777 /drivers/misc | |
parent | 14ea4db18c069816e7ff0441a2f39a12d2feb11c (diff) | |
download | linux-5e180e6f6ac9892b15870d43741c47f2cd4dbe6e.tar.bz2 |
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 <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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/eeprom/at25.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |