Re: [PATCH v3 leds-next 2/2] dt-bindings: leds: Document Turris Omnia LED controller binding

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

 



Hi Rob,

I have a question about how to design correctly the situation about
global brigthness on this controller in the device tree.

The thing is that these LEDs are, in hardware, controlled via PWM and
SPI, but this is done via microcontroller running a proprietary
firmware. So from the point of view of the CPU, should the LEDs be
described in the device tree as connected to the mircocontroller
direclty, or should pwm and spi nodes be created as well?

Next thing is that the values of the RGB channels for each LED is
controlled via SPI, but the global brightness controlled byt the single
PWM also controls the LED brightnesses globally.

How should this be specified?

Thank you.

> +Example:
> +
> +	led-controller@2b {
> +		compatible = "cznic,turris-omnia-leds";
> +		reg = <0x2b>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		led@0 {
> +			reg = <0x0>;
> +			label = "userB";
> +			linux,default-trigger = "heartbeat";
> +		};
> +
> +		led@1 {
> +			reg = <0x1>;
> +			label = "userA";
> +		};
> +
> +		led@2 {
> +			reg = <0x2>;
> +			label = "pci3";
> +		};
> +
> +		led@3 {
> +			reg = <0x3>;
> +			label = "pci2";
> +		};
> +
> +		led@4 {
> +			reg = <0x4>;
> +			label = "pci1";
> +		};
> +
> +		led@5 {
> +			reg = <0x5>;
> +			label = "wan";
> +		};
> +
> +		led@6 {
> +			reg = <0x6>;
> +			label = "lan4";
> +		};
> +
> +		led@7 {
> +			reg = <0x7>;
> +			label = "lan3";
> +		};
> +
> +		led@8 {
> +			reg = <0x8>;
> +			label = "lan2";
> +		};
> +
> +		led@9 {
> +			reg = <0x9>;
> +			label = "lan1";
> +		};
> +
> +		led@a {
> +			reg = <0xa>;
> +			label = "lan0";
> +		};
> +
> +		led@b {
> +			reg = <0xb>;
> +			label = "power";
> +		};
> +	};



[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