I'm trying to debug a kernel panic on an embedded device with no access to serial output. The device has a small notification LED which is supported by a driver in the Linux kernel.

So, I thought of porting kernel/morse.c to Linux's LED subsystem (the original used something related to virtual terminal).

However, I've quickly ran into an issue. See, there is a led_brightness_set() function which can be used to turn on/off the LED. It takes two arguments - led_cdev (the LED device struct) and brightness_value (brightness value).

I know how to set the brightness_value but I don't know how to create/get led_cdev. Is there a function for this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.