Skip to contentSkip to conversation

Introduce Synology x86 NAS LEDs driver

PATCH New Ondrej Zary 1 participant 1 message Nov 25 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Introduce Synology x86 NAS LEDs driver

Add platform driver for Synology x86-based NAS devices to support HDD LEDs controlled by ICH9 GPIO pins.

Only DS411+II is supported for now (DS411+ should be the same except CPU).

Buttons and other LEDs are not supported by this driver because they're controlled by a PIC MCU (connected through serial port).

---
Changes in v4:
- added DMI match for BIOS vendor and version
- removed PCI device presence checking

Changes in v3:
- descriptions changed to mention LEDs
- GPIO swnodes are used instead of gpiod
- improved PCI device presence checking

Changes in v2:
- fixed includes (order, added missing, removed kernel.h)
- added missing DMI and PCI dependencies to Kconfig
- added PCI device presence check details to changelog
- used %pe for error message

---
 drivers/platform/x86/Kconfig        |  16 +++
 drivers/platform/x86/Makefile       |   3 +
 drivers/platform/x86/synology-x86.c | 200 ++++++++++++++++++++++++++++
 3 files changed, 219 insertions(+)
 create mode 100644 drivers/platform/x86/synology-x86.c
drivers/platform/x86/Kconfig +16 -0
index 9ce384e0475e..64aa44c7f239 100644
@@ -1059,6 +1059,22 @@ config OXP_EC
 
 source "drivers/platform/x86/tuxedo/Kconfig"
 
+config SYNOLOGY_X86
+	tristate "Synology x86 NAS LEDs driver"
+	depends on DMI
+	depends on GPIOLIB
+	depends on LPC_ICH
+	depends on GPIO_ICH
+	depends on LEDS_CLASS
+	depends on PCI
+	select LEDS_GPIO
+	help
+	  This driver provides support for the HDD LEDs on Synology x86 NAS
+	  devices.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called synology-x86.
+
 endif # X86_PLATFORM_DEVICES
 
 config P2SB
drivers/platform/x86/Makefile +3 -0
index 229057234d00..a1806eb0efc9 100644
@@ -166,3 +166,6 @@ obj-$(CONFIG_SEL3350_PLATFORM)		+= sel3350-platform.o
 
 # OneXPlayer
 obj-$(CONFIG_OXP_EC)			+= oxpec.o
+
+# Synology
+obj-$(CONFIG_SYNOLOGY_X86)		+= synology-x86.o
drivers/platform/x86/synology-x86.c new file +200 -0

200 lines not on this page · raw message

Signature · 1 line
Ondrej Zary