[PATCH 0/8] kernel: mtdsplit_uimage: use device tree properties for non-standard uimage parsing

Bjørn Mork bjorn at mork.no
Thu Nov 26 09:06:11 EST 2020


Sander Vanheule <sander at svanheule.net> writes:

> I don't know how others feel about this, but I find something like
> 	"ih-type = <IH_TYPE_FILESYSTEM>",
> to be clearer than
> 	"ih-type = <7>".
> Would it be an option to create a dt-bindings header? For
> example,'include/dt-indings/mtd/partition/uimage.h' (to mirror the DT
> documentation paths) could include definitions for IH_TYPE_*.
> mtdsplit_uimage.c could even include this header to prevent duplicate
> definitions.

This is a good idea.  I will do that for the next version.

I see that mainline has an example of a shared header in
include/dt-bindings/input/linux-event-codes.h
which is a symlink to include/uapi/linux/input-event-codes.h

Something similar could be done here.

>>   kernel: mtdsplit_uimage: replace "netgear,uimage" parser
>>   kernel: mtdsplit_uimage: replace "edimax,uimage" parser
>
> This patch removes "edimax,uimage", while also introducing the DT
> properties to do this. For the other properties you split this up. If
> there won't be any formal documentation, maybe a separate patch could
> serve this purpose?


Yes, the splitting should have been more consistent.  Will fix that for
the next version.

And I do consider writing up a formal DT binding as the first patch,
following the guidelines in
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html

Not because I think this is material for upstream. But I agree that
non-obvious stuff like these properties should be documented. If nothing
else, then for my own good.


Bjørn



More information about the openwrt-devel mailing list