ptp: ocp: add nvmem interface for accessing eeprom
authorJonathan Lemon <jonathan.lemon@gmail.com>
Tue, 8 Mar 2022 00:05:34 +0000 (16:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2022 10:57:07 +0000 (10:57 +0000)
commit0cfcdd1ebcfe1a9b262f6ad8419580720dc843c4
tree80d95eb51df2558591052d0cf661ee783793d3fb
parentb57b44f7496a76cf881acd64defc1aeb39fbdbfe
ptp: ocp: add nvmem interface for accessing eeprom

Add the at24 drivers for the eeprom, and use the accessors
via the nvmem API instead of direct i2c accesses.  This makes
things cleaner.

Add an eeprom map table which specifies where the pre-defined
information is located.  Retrieve the information and and export
it via the devlink interface.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_ocp.c