Re: [PATCH v2 1/3] nvmem: core: introduce cells parser

From: John Thomson
Date: Mon Sep 27 2021 - 08:39:42 EST

Hi Srinivas,

On Mon, 27 Sep 2021, at 10:12, Srinivas Kandagatla wrote:
> On 21/09/2021 06:50, John Thomson wrote:
>> Hi Srinivas,
>> Can I note here that I would like to parse
>> TLV data from an SPI-NOR device to NVMEM cells.
>> The same general use case (getting mac-address from OEM data).
>> Was planning to base my work on this series, as well as
> This series is for post-processing nvmem cell data before it gets to
> consumers.
> Are you referring to parsing nvmem cell information (offset, name) in
> your usecase like:
> Or
> Are you referring to post-processing nvmem cell data ?

I have TLV data where I want to parse the tag lengths and tag IDs to map them into offsets and names like a NVMEM cells lookups table.

Then, some of these cell data would need to be post processed to use directly.
I have only a base MAC address available, and would like to specify increments for different network ports.
As an additional example, another TLV tag:value has compressed wifi calibration data. If I could post process this cell data I could then feed it into ath9k with:

In my case, this is all currently done in userspace.
I saw this (ONIE TLV NVMEM parser) series and thought it offered something very similar to
(the first part of) what I would like to do.

John Thomson