lkml.org 
[lkml]   [2014]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 2/8] OF: Introduce DT overlay support.
    Hi Grant,

    Am 14.05.2014 12:08, schrieb Grant Likely:
    > More generally I am concerned about whether or not overlays
    > will introduce corner cases that can never be handled correctly,
    > particularly in how multiple overlays will get handled. I want to see
    > very clear rules on what happens when multiple overlays are applied, and
    > then removed again. Is it possible to remove overlays out of order? If
    > so, what are the conditions that would not be allowed?

    Yes, it is possible that an overlay depends on another.

    The problem is not, that an overlay is removed other overlays depend on,
    but that nodes of an overlay may depend on the to-be-removed overlay and
    the resulting devicetree can become inconsistent.


    I have an SPI Bus with two slaves. The second slave is used only on one
    of our boards. That is why we split the overlays the following way:

    xxxx_spi1.dts:
    Pinmux for SPI-Bus and activation of spi-controller.
    Pinmux for CS0 and definition of first slave.

    xxxx_spi1_cs1:
    Pinmux for CS1 and definition of second slave.

    When the overlay for the bus is removed, the overlays for the second
    slave does not make any sense anymore.

    It is even worse in a scenario we have with a test board.
    One of the slaves is an spi-io-controller with a few bitbanging i2c
    masters. In an extreme case, each component is defined in a separate
    overlay and only the overlay with the master is removed. I know, that
    this is completely sick. The devices are removed cleanly because of the
    device dependency.

    Michael



    \
     
     \ /
      Last update: 2014-05-14 15:01    [W:7.188 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site