lkml.org 
[lkml]   [2021]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH v3 4/8] leds: trigger: netdev: rename and expose NETDEV trigger enum modes
    On Tue, Nov 09, 2021 at 09:58:27PM +0100, Andrew Lunn wrote:
    > On Tue, Nov 09, 2021 at 03:26:04AM +0100, Ansuel Smith wrote:
    > > Rename NETDEV trigger enum modes to a more simbolic name and move them
    >
    > symbolic. Randy is slipping :-)
    >
    > > in leds.h to make them accessible by any user.
    >
    > any user? I would be more specific than that. Other triggers dealing
    > with netdev states?
    >

    Ok will be more specific. A LED driver require to explicitly support the
    trigger to run in hardware mode. The LED driver will take the
    trigger_data and elaborate his struct to parse all the option
    (blink_mode bitmap, interval)

    So the user would be a LED driver that adds support for that specific
    trigger. That is also the reason we need to export them.

    > > +++ b/include/linux/leds.h
    > > @@ -548,6 +548,13 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
    > >
    > > #endif /* CONFIG_LEDS_TRIGGERS */
    > >
    > > +/* Trigger specific enum */
    >
    > You probably want netdev in the comment above. Things could get
    > interesting if other ledtrig-*.c started using them.
    >
    > > +enum led_trigger_netdev_modes {
    > > + TRIGGER_NETDEV_LINK,
    > > + TRIGGER_NETDEV_TX,
    > > + TRIGGER_NETDEV_RX,
    > > +};
    > > +
    > > /* Trigger specific functions */
    > > #ifdef CONFIG_LEDS_TRIGGER_DISK
    > > void ledtrig_disk_activity(bool write);
    > > --
    > > 2.32.0
    > >

    --
    Ansuel

    \
     
     \ /
      Last update: 2021-11-10 20:58    [W:4.295 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site