From 1a5f2263d388016c88d39e141c7eb8085c9313fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Wed, 5 Apr 2023 08:07:00 +0200
Subject: [PATCH] leds: add support for Sercomm MSP430 LED controller
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Sercomm added an external MSP430G2513 for controlling LEDs through SPI on some
boards.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 drivers/leds/Kconfig  | 9 +++++++++
 drivers/leds/Makefile | 1 +
 2 files changed, 10 insertions(+)

--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -328,6 +328,15 @@ config LEDS_COBALT_RAQ
 	help
 	  This option enables support for the Cobalt Raq series LEDs.
 
+config LEDS_SERCOMM_MSP430
+	tristate "LED support for Sercomm MSP430 SPI LED controllers"
+	depends on LEDS_CLASS
+	depends on SPI
+	depends on OF
+	help
+	  This option enables support for the Sercomm MSP430G2513 SPI LED
+	  controllers.
+
 config LEDS_SUN50I_A100
 	tristate "LED support for Allwinner A100 RGB LED controller"
 	depends on LEDS_CLASS_MULTICOLOR
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -81,6 +81,7 @@ obj-$(CONFIG_LEDS_POWERNV)		+= leds-powe
 obj-$(CONFIG_LEDS_PWM)			+= leds-pwm.o
 obj-$(CONFIG_LEDS_REGULATOR)		+= leds-regulator.o
 obj-$(CONFIG_LEDS_SC27XX_BLTC)		+= leds-sc27xx-bltc.o
+obj-$(CONFIG_LEDS_SERCOMM_MSP430)	+= leds-sercomm-msp430.o
 obj-$(CONFIG_LEDS_ST1202)		+= leds-st1202.o
 obj-$(CONFIG_LEDS_SUN50I_A100)		+= leds-sun50i-a100.o
 obj-$(CONFIG_LEDS_SUNFIRE)		+= leds-sunfire.o
