summaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom/at24.c
diff options
context:
space:
mode:
authorVadym Kochan <vadym.kochan@plvision.eu>2020-09-16 20:09:31 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-09-17 11:05:20 +0300
commit774b9f43716d5a79272e052bcae2f3939b02a2c6 (patch)
treefd2550faff8ced7572faec254cd25ca8069f983b /drivers/misc/eeprom/at24.c
parent99363d1c26c825055f8a879d9d5c2b78168cf655 (diff)
downloadlinux-774b9f43716d5a79272e052bcae2f3939b02a2c6.tar.xz
eeprom: at24: 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> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/misc/eeprom/at24.c')
-rw-r--r--drivers/misc/eeprom/at24.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 8f5de5f10bbe..00c8ac0677b4 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -713,6 +713,7 @@ static int at24_probe(struct i2c_client *client)
return err;
}
+ nvmem_config.type = NVMEM_TYPE_EEPROM;
nvmem_config.name = dev_name(dev);
nvmem_config.dev = dev;
nvmem_config.read_only = !writable;