Re: [RFC PATCH v2 1/2] dt-bindings: leds: Add multicolor PWM LED bindings

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

 



Hi Marek,

On 1/25/22 21:27, Marek Behún wrote:

what about

	multi-led@0 {
		color = <LED_COLOR_ID_RGB>;
		function = LED_FUNCTION_INDICATOR;
		pwms = <&pwm1 0 1000000>,
		       <&pwm2 0 1000000>,
		       <&pwm3 0 1000000>;
		channels = <LED_COLOR_ID_RED>,
			   <LED_COLOR_ID_GREEN>,
			   <LED_COLOR_ID_BLUE>;
	};

I am not saying that it is necessarily better, just comenting that
maybe it is, since it saves some space. `pwms` is phandle-array, so it
can contain references to multiple pwms, and we have functions which
make getting these pwms in driver code easy...

This this nice. I misunderstood the requirements by the multicolor LED class so I didn't think this was possible. I will change my patch.

Also this example won't compile with
    make dt_bindings_check
because you don't have pwm1, pwm2
and pwm3 defined...

Yes, it does. The checker compiles the example DTS snippets with this in the header: /plugin/; // silence any missing phandle references

Best regards,
Sven



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux