Message ID | 20210526180020.13557-1-kabel@kernel.org |
---|---|
Headers | show |
Series | Add support for offloading netdev trigger to HW | expand |
On Wed, May 26, 2021 at 08:00:16PM +0200, Marek Behún wrote: > The trigger_data struct is allocated with kzalloc, so we do not need to > explicitly set members to zero. > > Signed-off-by: Marek Behún <kabel@kernel.org> > Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On Wed, May 26, 2021 at 08:00:18PM +0200, Marek Behún wrote: > In preparation for HW offloading of netdev trigger, move struct > led_trigger_data into global include directory, into file > linux/ledtrig.h, so that drivers wanting to offload the trigger can see > the requested settings. > > Signed-off-by: Marek Behún <kabel@kernel.org> > --- > drivers/leds/trigger/ledtrig-netdev.c | 23 +--------------- > include/linux/ledtrig.h | 38 +++++++++++++++++++++++++++ I'm wondering how this is going to scale, if we have a lot of triggers which can be offloaded. Rather than try to pack them all into one header, would it make more sense to add include/linux/led/ledtrig-netdev.h Andrew
On Thu, 27 May 2021 18:48:21 +0200 Andrew Lunn <andrew@lunn.ch> wrote: > On Wed, May 26, 2021 at 08:00:18PM +0200, Marek Behún wrote: > > In preparation for HW offloading of netdev trigger, move struct > > led_trigger_data into global include directory, into file > > linux/ledtrig.h, so that drivers wanting to offload the trigger can > > see the requested settings. > > > > Signed-off-by: Marek Behún <kabel@kernel.org> > > --- > > drivers/leds/trigger/ledtrig-netdev.c | 23 +--------------- > > include/linux/ledtrig.h | 38 > > +++++++++++++++++++++++++++ > > I'm wondering how this is going to scale, if we have a lot of triggers > which can be offloaded. Rather than try to pack them all into > one header, would it make more sense to add > > include/linux/led/ledtrig-netdev.h > > Andrew Hmm, I guess you are right. Also when looking at a LED controller driver we could immediately see which triggers this driver can offload, when looking at headers included.