eeprom: at24: Add support for the Sony VAIO EEPROMs
authorJean Delvare <jdelvare@suse.de>
Fri, 7 Aug 2020 13:00:05 +0000 (15:00 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 18 Aug 2020 13:40:20 +0000 (15:40 +0200)
commita4423cedc56fd16405240243bdfe6d02823cb26a
treea7fce8a1a07980fb5d98a1c3c94a74e937b5e235
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
eeprom: at24: Add support for the Sony VAIO EEPROMs

Special handling of the Sony VAIO EEPROMs is the last feature of the
legacy eeprom driver that the at24 driver does not support. Adding
this would let us deprecate and eventually remove the legacy eeprom
driver.

So add the option to specify a post-processing callback function that
is called after reading data from the EEPROM, before it is returned
to the user. The 24c02-vaio type is the first use case of that option:
the callback function will mask the sensitive data for non-root users
exactly as the legacy eeprom driver was doing.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[Bartosz: removed a stray newline]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/misc/eeprom/at24.c