From ecbd9c87f073f097d9fe56390353e64e963e866a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 6 Mar 2018 10:03:03 +0100
Subject: [PATCH 03/27] leds: add reset-controller based driver

Signed-off-by: John Crispin <john@phrozen.org>
---
 drivers/leds/Kconfig      |  11 ++++
 drivers/leds/Makefile     |   1 +
 drivers/leds/leds-reset.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 149 insertions(+)
 create mode 100644 drivers/leds/leds-reset.c

--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -977,6 +977,17 @@ source "drivers/leds/flash/Kconfig"
 comment "RGB LED drivers"
 source "drivers/leds/rgb/Kconfig"
 
+config LEDS_RESET
+	tristate "LED support for reset-controller API"
+	depends on LEDS_CLASS
+	depends on RESET_CONTROLLER
+	help
+	  This option enables support for LEDs connected to pins driven by reset
+	  controllers. Yes, DNI actual built HW like that.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called leds-reset.
+
 comment "LED Triggers"
 source "drivers/leds/trigger/Kconfig"
 
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -93,6 +93,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA)		+= leds
 obj-$(CONFIG_LEDS_WM831X_STATUS)	+= leds-wm831x-status.o
 obj-$(CONFIG_LEDS_WM8350)		+= leds-wm8350.o
 obj-$(CONFIG_LEDS_WRAP)			+= leds-wrap.o
+obj-$(CONFIG_LEDS_RESET)		+= leds-reset.o
 
 # Kinetic ExpressWire Protocol
 obj-$(CONFIG_LEDS_EXPRESSWIRE)		+= leds-expresswire.o
