Out of tree packages have their files in package directory cf openvpn chilicoova
One source file can be put in package, maybe 10, but if it is unmanageable better to have git or checksummed tarball.
I want modify the driver slightly so I can drive led colors directly from linux triggers without scripts or as such.
The plan is to include a priority element in the DTS so that only the led with the highest priority is displayed, or that a led with a same priority is staged one after the other or something?
It would enable a single binding to a led or mix led color without complicated user space scripts or as such and enable one to one binding and would work with aliases direct from the DTS and standard linux triggers without sripting.
For example, consider the below DTS sample as a potential configuration for the LED's, offering priority and heartbeat.
All lower priority statuses would be ignored by the driver and it would mean just what is important is showed so you don't get a flickering light show waiting 30 seconds for it to flash through all cycles to obtain the info you want.
I was also suggested that Maybe a better way would be to implement a custom trigger for the LEDs.
This trigger would offer knobs in sysfs so that the user space can indicate what is happening, only problem that is beyond my programing skill as it will require more work.
ok so i built the kernel module and modified a dts for a target but I have a question:
How do I debug the kernel module?
as I don't know what to expect but I thought the grouped led's would show up in sys/class/leds
but i get the below error which means invalid argument i believe.
leds_group_multicolor multicolor-led-group: error -EINVAL: failed to register multicolor LED for (null).
leds_group_multicolor: probe of multicolor-led-group failed with error -22
ok I was having a think about things and implementing priority via the device tree is probably not the best idea but if I was to implement priority of the led's via sysfs eg:
I could also implement the colors the same way by having multiple triggers for each primary and secondary color under the same group in sysfs rather than virtual led's within the device tree.