Array manipulation

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



There are a number of cases I’ve come across when we want to manipulate an array property in DTS.  Most cases I’ve see today end up replacing the whole property because we don’t have any means/syntax to manipulate the array.

I was hoping to see if, one there is interest in adding support to manipulate array’s to dtc, and defining what features and syntax would be.

Figured I’d start with some use examples I know of:

- Updating compatible when we have a base SoC .dtsi file shared across a family of SoC’s.  Than a more specific SoC .dtsi file wanting to append a more specific compatible.
   * Add an entry at tail of array
   * Add an entry at head of array

- QSPI nodes where the reg’s are to both the controller and mmap QSPI region, the board dts might want to manipulate the size element
   * Modify a cell of a specific index

- SPI controller, having an overlay .dtsi that wants to update a cs-gpio entry
   * Replace an entry at a specific index

Will let other’s hopefully chime in with other use cases examples they’ve seen.  I’m guessing there are probably cases for deleting a specific index, deleting head or deleting tail.

- k



[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