netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH leds v1 0/5] Add support for offloading netdev trigger to HW
@ 2021-05-26 18:00 Marek Behún
  2021-05-26 18:00 ` [PATCH leds v1 1/5] leds: trigger: netdev: don't explicitly zero kzalloced data Marek Behún
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Marek Behún @ 2021-05-26 18:00 UTC (permalink / raw)
  To: linux-leds
  Cc: netdev, Pavel Machek, Dan Murphy, Russell King, Andrew Lunn,
	Matthias Schiffer, Jacek Anaszewski, Mauro Carvalho Chehab,
	Marek Behún

Hello,

I am sending the first non-RFC version of the series adding support
for offloading LED triggers to HW, with the netdev trigger being the
first user.

I have addressed the issues with the RFC version from October.

This version only implements the offloading API and adds support for
offloading to the netdev trigger. In the RFC I also added one user of
this API (Marvell ethernet PHY driver). I plan to continue the work on
those patches once the offloading API is finally merged.

Also, there is now other possible user for this API: leds-nuc driver
by Mauro.

Changes since RFC:
- split the patch adding HW offloading support to netdev trigger into
  several separate patches (suggested by Pavel):
  1. move trigger data structure to include/linux/ledtrig.h
  2. support HW offloading
  3. change spinlock to mutex
- fixed bug where the .offloaded variable was not set to false when
  offloading was disabled (suggested by Pavel)
- removed the code saving one call to set_baseline_state() on the
  NETDEV_CHANGE event. It is not needed, the trigger_offload() method
  can handle this situation on its own (suggested by Pavel)
- documentation now explicitly says that when offloading is being
  disabled, the function must return 0 (no error) (suggested by Pavel)

Marek Behún (5):
  leds: trigger: netdev: don't explicitly zero kzalloced data
  leds: trigger: add API for HW offloading of triggers
  leds: trigger: netdev: move trigger data structure to global include
    dir
  leds: trigger: netdev: support HW offloading
  leds: trigger: netdev: change spinlock to mutex

 Documentation/leds/leds-class.rst     | 22 +++++++++++++
 drivers/leds/led-triggers.c           |  1 +
 drivers/leds/trigger/ledtrig-netdev.c | 47 ++++++++-------------------
 include/linux/leds.h                  | 29 +++++++++++++++++
 include/linux/ledtrig.h               | 40 +++++++++++++++++++++++
 5 files changed, 105 insertions(+), 34 deletions(-)
 create mode 100644 include/linux/ledtrig.h

-- 
2.26.3


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-05-28 13:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-26 18:00 [PATCH leds v1 0/5] Add support for offloading netdev trigger to HW Marek Behún
2021-05-26 18:00 ` [PATCH leds v1 1/5] leds: trigger: netdev: don't explicitly zero kzalloced data Marek Behún
2021-05-27 16:38   ` Andrew Lunn
2021-05-26 18:00 ` [PATCH leds v1 2/5] leds: trigger: add API for HW offloading of triggers Marek Behún
2021-05-26 18:00 ` [PATCH leds v1 3/5] leds: trigger: netdev: move trigger data structure to global include dir Marek Behún
2021-05-27 16:48   ` Andrew Lunn
2021-05-28  6:28     ` Marek Behún
2021-05-26 18:00 ` [PATCH leds v1 4/5] leds: trigger: netdev: support HW offloading Marek Behún
2021-05-27 16:57   ` Andrew Lunn
2021-05-28  6:45     ` Marek Behún
2021-05-28 13:50       ` Andrew Lunn
2021-05-28 13:57         ` Marek Behún
2021-05-26 18:00 ` [PATCH leds v1 5/5] leds: trigger: netdev: change spinlock to mutex Marek Behún

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).