[PATCH v2 12/13] of: add barebox-serial driver

Oleksij Rempel o.rempel at pengutronix.de
Tue Aug 11 04:58:47 EDT 2020


On Tue, Aug 11, 2020 at 10:34:01AM +0200, Sascha Hauer wrote:
> On Wed, Aug 05, 2020 at 12:16:27PM +0200, Oleksij Rempel wrote:
> > Provide a driver which should act as nvmem consumer
> > for board serial number information.
> > 
> > To make use of this driver, DTS should contain a serial
> > node with compatibe "barebox,serial" and nvmem-cell-names
> > "serial-number":
> > 
> > ...
> > 	chosen {
> > 		serial {
> > 			compatible = "barebox,serial";
> > 			nvmem-cell-names = "serial-number";
> > 			nvmem-cells = &some_provider;
> > 		};
> > 	};
> 
> This driver only works when the EEPROM or whatever provides the NVMEM
> contains the serial number in exactly the same format as shall be added
> to the /serial-number property. This seems to be a special case only and
> doesn't seem to justify a generic driver.

As with usual devicetree based solution we can add additional
compatibles to better describe a variant or quirk which should be used
to convert raw data to the serial number in usable for environment and
device tree way. I hope, by having generic drivers other users will alight
with it by making new products or extend existing driver by mainlining
existing products.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20200811/1b0c2d46/attachment.sig>


More information about the barebox mailing list