core.c sequence:Or, treat cells with length "0" in a special way and allow to updatebefore register.
cell info later.you can update irrespective of the length, as long as this is done
Lets keep the core code clean for now, I would expect the provider};I assume parser driver can just invoke add_cell_table (with may be
some_dev_node {
compatible = "xxx";
nvmem-cells = <&mac_address>;
nvmem-cell-names = "mac-address";
};
== CODE ==
ret = of_get_mac_address(dev->of_node, base_mac);
==========
If you notice the mac_address node reg is 0.
This node "reg" property should be updated ( using of_update_property())
by nvmem-provider driver while tlv parsing and by matching the node name
with tlv name.
by adding 'bool update' field to the cell_info struct) and core.c will just
update existing cells parsed from OF.
driver along with parser function to do update the nodes.
--srini
1) after cells parsed from OF:
2) lookup the parser
3) parser->cells_parse(ctx, table)
3.a) update existing cells matched by name from table
4) parser->cells_clean(ctx, table)
/* to free cell's_info allocated by the parser driver */
as alternative way, I think it would be more generic to
provide nvmem-provider.h API to update the existing cell info,
however it makes sense only when cells were parsed
by the cell parser, in the other situations the
cell should be well defined.
with this approach the parser driver will be just called
via parser->cells_parse(ctx) and will call nvmem_cell_info_update()
for each parsed cells.