[lkml]   [2020]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v3 0/3] nvmem: add ONIE NVMEM cells provider
This series adds cells provider for the ONIE TLV attributes which are
stored on NVMEM device. It adds possibility to read the mac address (and
other info) by other drivers.

There is a special case for this driver that before registering cells
the nvmem device should be first parsed to read the TLV layout which
holds the cells data.

1) Update core.c changes by extending notification mechanism
by adding new NVMEM_PRE_ADD event id which is called before lookup
table cells binding, this allows for notification handler to
register cells which require nvmem parsing.

2) Update onie-cells.c to use nvmem notification to parse and
register cells before device and cells are finally registered.

Use subsys_init() macro which allows to probe before nvmem drivers.

3) at24 driver enables regulator and pm state machine after nvmem
registration which does not allow to use it on handing NVMEM_PRE_ADD event.

1) Fixed wrong memcmp comparison

Vadym Kochan (3):
nvmem: core: allow to register cells during nvmem registration
nvmem: add ONIE NVMEM cells support
misc: eeprom: at24: register nvmem only after eeprom is ready to use

drivers/misc/eeprom/at24.c | 11 +-
drivers/nvmem/Kconfig | 9 +
drivers/nvmem/Makefile | 3 +
drivers/nvmem/core.c | 2 +
drivers/nvmem/onie-cells.c | 410 +++++++++++++++++++++++++++++++++
include/linux/nvmem-consumer.h | 1 +
6 files changed, 432 insertions(+), 4 deletions(-)
create mode 100644 drivers/nvmem/onie-cells.c


 \ /
  Last update: 2020-08-31 03:56    [W:0.102 / U:30.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site