On Mon, May 29, 2023 at 08:12:42AM -0600, Jonathan Corbet wrote: > Bagas Sanjaya <bagasdotme@xxxxxxxxx> writes: > > >> + - hw_control_get_device: > >> + return the device associated with the LED driver in > >> + hw control. A trigger might use this to match the > >> + returned device from this function with a configured > >> + device for the trigger as the source for blinking > >> + events and correctly enable hw control. > >> + (example a netdev trigger configured to blink for a > >> + particular dev match the returned dev from get_device > >> + to set hw control) > >> + > >> + Return a device or NULL if nothing is currently attached. > > Returns a device name? > > The return type of this function is struct device * - how would you > expect it to return a name? > Just to clarify, a device name can't be returned. Not every device have a name and such name can be changed. An example is network device where you can change the name of the interface. Using the device prevents all of this problem. -- Ansuel