Skip to content

Commit

Permalink
eeprom: at24: set type id as EEPROM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vadym Kochan authored and Bartosz Golaszewski committed Sep 17, 2020
1 parent 99363d1 commit 774b9f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/misc/eeprom/at24.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 774b9f4

Please sign in to comment.