/bits/ encoding

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



What's the expected property length in these 2 cases?:

prop = /bits/ 16 <0x1234 0x5678>, <0x9abc 0xdef0>;
prop = /bits/ 16 <0x1234 0x5678 0x9abc 0xdef0>;

For 32-bit sizes, the <> don't matter. I had assumed /bits/ applied to
the whole property value and the <> don't matter in that case either.
But that's not the case in dtc. In the 1st example, the last 2 values
are 32-bit. In order to make all values in the 1st example 16-bit, we
have to do:

prop = /bits/ 16 <0x1234 0x5678>, /bits/ 16 <0x9abc 0xdef0>;

That also means one could do:

prop = /bits/ 16 <0x1234 0x5678>, /bits/ 8 <0x9a 0xbc 0xde 0xf0>;

Something we want to support (it already works)? I don't think such a
thing exists in the wild, the kernel's array parsing doesn't expect
it, and I haven't encountered a use for it. Given the non-existent
type information in FDT, that doesn't seem like a great idea.

Rob



[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