Re: [PATCH 2/8 v2] leds: add device tree bindings for register bit LEDs

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

 




On Tue, Sep 2, 2014 at 4:22 PM, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> On Tue, Sep 2, 2014 at 2:02 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>> +LED sub-node properties:
>> +
>> +Required properties:
>> +- compatible : must be "register-bit-led"
>> +- offset : register offset to the register controlling this LED
>> +- mask : bit mask for the bit controlling this LED in the register
>
> Why don't you use a "reg" property with "#address-cells = <2>" and
> "#size-cells = <1>", so you can store offset and mask there?

Because "reg" means a register range not based off another range,
i.e. not relative, and the OF cores does not allow overlapping
reg ranges as would be the case here IIRC.

>> +syscon: syscon@10000000 {
>> +       compatible = "arm,realview-pb1176-syscon", "syscon";
>> +       reg = <0x10000000 0x1000>;
>> +
>> +       led@08.0 {
>> +               compatible = "register-bit-led";
>> +               offset = <0x08>;
>> +               mask = <0x01>;
>> +               label = "versatile:0";
>> +               linux,default-trigger = "heartbeat";
>> +               default-state = "on";
>> +       };
>
> ePAPR v1.1 says:
>
> "The unit-address must match the first address specified in the reg property
>  of the node. If the node has no reg property, the @ and unit-address must
>  be omitted ..."
>
> So you cannot have the "@8.0" without a "reg" property.

This terminology was suggested by Rob Herring due to the fact that
there were no previous examples.

Rob: care to comment?

Right now I have that distinct feeling of despair as the v8 patch set
is still stuck in DT syntax discussions...

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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 Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux