public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] PCIe Enclosure LED Management
@ 2024-05-28 13:19 Mariusz Tkaczyk
  2024-05-28 13:19 ` [PATCH v2 1/3] leds: Init leds class earlier Mariusz Tkaczyk
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Mariusz Tkaczyk @ 2024-05-28 13:19 UTC (permalink / raw)
  To: linux-pci
  Cc: Mariusz Tkaczyk, Arnd Bergmann, Bjorn Helgaas, Dan Williams,
	Greg Kroah-Hartman, Ilpo Jarvinen, Lukas Wunner, Keith Busch,
	Marek Behun, Pavel Machek, Randy Dunlap, Andy Shevchenko,
	Stuart Hayes

Patchset is named as PCIe Enclosure LED Management because it adds two features:
- Native PCIe Enclosure Management (NPEM)
- PCIe SSD Status LED Management (DSM)

Both are pattern oriented standards, they tell which "indication" should blink.
It doesn't control physical LED or pattern visualization.

Overall, driver is simple but it was not simple to fit it into interfaces
we have in kernel (We considered leds and enclosure interfaces). It reuses
leds interface, this approach seems to be the best because:
- leds are actively maintained, no new interface added.
- leds do not require any extensions, enclosure needs to be adjusted first.

There are trade-offs:
- "brightness" is the name of sysfs file to control led. It is not
  natural to use brightness to set patterns, that is why multiple led
  devices are created (one per indication);
- Update of one led may affect other leds, led triggers may not work
  as expected.

This patchset was made in close collaboration with Lucas Wunner.

Before it can be merged, DSM tests are needed.
Stuart, please test it and let us know.

Changes from v1:
- Renamed "pattern" to indication.
- DSM support added (not tested yet!).
- fixed nits reported by Bjorn.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Marek Behun <marek.behun@nic.cz>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Stuart Hayes <stuart.w.hayes@gmail.com>
Link: https://lore.kernel.org/linux-pci/20240215142345.6073-1-mariusz.tkaczyk@linux.intel.com/

Mariusz Tkaczyk (3):
  leds: Init leds class earlier
  PCI/NPEM: Add Native PCIe Enclosure Management support
  PCI/NPEM: Add _DSM PCIe SSD status LED management

 drivers/leds/led-class.c      |   2 +-
 drivers/pci/Kconfig           |   9 +
 drivers/pci/Makefile          |   1 +
 drivers/pci/npem.c            | 551 ++++++++++++++++++++++++++++++++++
 drivers/pci/pci.h             |   8 +
 drivers/pci/probe.c           |   2 +
 drivers/pci/remove.c          |   2 +
 include/linux/pci.h           |   3 +
 include/uapi/linux/pci_regs.h |  34 +++
 9 files changed, 611 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pci/npem.c

-- 
2.35.3


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

end of thread, other threads:[~2024-06-19 14:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 13:19 [PATCH v2 0/3] PCIe Enclosure LED Management Mariusz Tkaczyk
2024-05-28 13:19 ` [PATCH v2 1/3] leds: Init leds class earlier Mariusz Tkaczyk
2024-05-29  4:22   ` Dan Williams
2024-06-14 14:08     ` Lukas Wunner
2024-06-14 14:13       ` Greg Kroah-Hartman
2024-05-28 13:19 ` [PATCH v2 2/3] PCI/NPEM: Add Native PCIe Enclosure Management support Mariusz Tkaczyk
2024-05-28 13:55   ` Ilpo Järvinen
2024-06-14 13:40     ` Mariusz Tkaczyk
2024-05-29  5:21   ` Dan Williams
2024-05-29  9:38     ` Lukas Wunner
2024-06-12 11:40       ` Mariusz Tkaczyk
2024-06-13 16:11         ` stuart hayes
2024-06-19 14:28     ` Mariusz Tkaczyk
2024-06-14 21:06   ` stuart hayes
2024-06-15 10:33     ` Lukas Wunner
2024-06-18  8:56       ` Mariusz Tkaczyk
2024-06-18 17:13         ` Lukas Wunner
2024-06-18 18:50         ` stuart hayes
2024-06-18 19:32           ` Dan Williams
2024-06-19  9:08             ` Lukas Wunner
2024-06-19 12:07               ` Mariusz Tkaczyk
2024-05-28 13:19 ` [PATCH v2 3/3] PCI/NPEM: Add _DSM PCIe SSD status LED management Mariusz Tkaczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox