Re: [PATCH v2 1/2] Preserve datatype information when parsing dts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 20 March 2018 at 21:45, Grant Likely <grant.likely@xxxxxxxxxxxx> wrote:
> The current code throws away all the data type and grouping information
> when parsing the DTS source file, which makes it difficult to
> reconstruct the data format when emitting a format that can express data
> types (ie. dts and yaml). Use the marker structure to mark the beginning
> of each integer array block (<> and []), and the datatype contained in
> each (8, 16, 32 & 64 bit widths).
>
> Signed-off-by: Grant Likely <grant.likely@xxxxxxx>
> ---
>  data.c       |  4 +++-
>  dtc-parser.y | 15 ++++++++++-----
>  dtc.h        |  7 +++++++
>  3 files changed, 20 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@xxxxxxxxxxxx>

> diff --git a/dtc.h b/dtc.h
> index 760f9e3..8734f47 100644
> --- a/dtc.h
> +++ b/dtc.h
> @@ -76,7 +76,14 @@ enum markertype {
>         REF_PHANDLE,
>         REF_PATH,
>         LABEL,
> +       MARKER_UINT8,
> +       MARKER_UINT16,
> +       MARKER_UINT32,
> +       MARKER_UINT64,
> +       MARKER_BLOB,
> +       MARKER_STRING,

The names are now inconsistent - perhaps they should all have a MARKER_ prefix?

>  };
> +extern const char *markername(enum markertype markertype);
>
>  struct  marker {
>         enum markertype type;
> --
> 2.11.0
>

REgards,
Simon
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux