Subject: Re: Changes for proplib to reduce kernel bloat
To: Tom Spindler <dogcow@babymeat.com>
From: Jachym Holecek <freza@dspfpga.com>
List: tech-kern
Date: 05/08/2006 16:15:12
# Tom Spindler 2006-05-08:
> > >that my first instinct would be to parse the XML at user level, and use
> > >some sort of TLV representation for the kernel interface.
> > 
> > Well, as long as there's support for SOME representation that can be
> > passed to the kernel, in common code that doesn't have to be reinvented
> > by each driver author who wants to do something similar. IIUC, the 'XML'
> > parser in proplib is just a lightweight parser for enough "XML" to
> > represent proplib objects ... maybe it's good enough?
> 
> Am I being particuarly oblivious in that I'm not understanding what
> exactly proplib's _intended_ use is? From the various commits and
> rototillery, it involves something with device drivers and other
> goo - but what exactly that use is eludes me. (The manpage and
> includes aren't illuminative, either.)

As I understand it, proplib provides framework to canonically
encode/decode primitive (number, bool, string) and aggregate
(array, lookup table/dictionary) data types to/from a string.
This can of course be used in a variety of applications.

For device drivers in particular, the model usage is that you
can setup device properties ({name, value} pairs) in
device_register() and the driver can pick it up in a generic
way.

For instance, in your board-specific device_register()
implementation you can store ethernet MAC address provided to
you by the bootloader as device property for say emac(4), which
can later on read it without having to care about its (MD)
origin.

HTH & please correct me if I'm wrong.

	-- Jachym