Skip to contentSkip to conversation

leds: Add driver for MAX8907 LED cell

PATCH RESEND Superseded Svyatoslav Ryhel 1 participant 2 messages Oct 14

Subsystems (2)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

cover leds: Add driver for MAX8907 LED cell

Add a small driver to control the LED cell provided by the MAX8907 PMIC. The LED does not require any specific configuration and is folded into the PMIC's node.

Svyatoslav Ryhel (1):
leds: Add driver for MAX8907 LED cell

 drivers/leds/Kconfig        |  7 ++++
 drivers/leds/Makefile       |  1 +
 drivers/leds/leds-max8907.c | 81 +++++++++++++++++++++++++++++++++++++
 drivers/mfd/max8907.c       |  1 +
 include/linux/mfd/max8907.h |  2 +-
 5 files changed, 91 insertions(+), 1 deletion(-)
 create mode 100644 drivers/leds/leds-max8907.c
Signature · 1 line
2.53.0
#1 lore raw

PATCH RESEND 1/1 leds: Add driver for MAX8907 LED cell

Add a small driver to control the LED cell provided by the MAX8907 PMIC. The LED does not require any specific configuration and is folded into the PMIC's node.

---
 drivers/leds/Kconfig        |  7 ++++
 drivers/leds/Makefile       |  1 +
 drivers/leds/leds-max8907.c | 81 +++++++++++++++++++++++++++++++++++++
 drivers/mfd/max8907.c       |  1 +
 include/linux/mfd/max8907.h |  2 +-
 5 files changed, 91 insertions(+), 1 deletion(-)
 create mode 100644 drivers/leds/leds-max8907.c
drivers/leds/Kconfig +7 -0
index 59445bbf2140a..ff00ecf5d858d 100644
@@ -813,6 +813,13 @@ config LEDS_MAX77705
 	help
 	  LED driver for MAX77705 PMIC from Maxim Integrated.
 
+config LEDS_MAX8907
+	tristate "LED support for MAX8907 PMIC"
+	depends on LEDS_CLASS && MFD_MAX8907
+	help
+	  This option enables support for on-chip LED drivers on
+	  MAXIM MAX8907 PMIC.
+
 config LEDS_MAX8997
 	tristate "LED support for MAX8997 PMIC"
 	depends on LEDS_CLASS && MFD_MAX8997
drivers/leds/Makefile +1 -0
index ed3fbf2aa2d2d..b9e815b2416d2 100644
@@ -66,6 +66,7 @@ obj-$(CONFIG_LEDS_LTC3220)		+= leds-ltc3220.o
 obj-$(CONFIG_LEDS_MAX5970)		+= leds-max5970.o
 obj-$(CONFIG_LEDS_MAX77650)		+= leds-max77650.o
 obj-$(CONFIG_LEDS_MAX77705)		+= leds-max77705.o
+obj-$(CONFIG_LEDS_MAX8907)		+= leds-max8907.o
 obj-$(CONFIG_LEDS_MAX8997)		+= leds-max8997.o
 obj-$(CONFIG_LEDS_MC13783)		+= leds-mc13783.o
 obj-$(CONFIG_LEDS_MENF21BMC)		+= leds-menf21bmc.o
drivers/leds/leds-max8907.c new file +81 -0

81 lines not on this page · raw message

drivers/mfd/max8907.c +1 -0
index a8cb2071aa7f4..b4562ec0ce18f 100644
@@ -21,6 +21,7 @@
 
 static const struct mfd_cell max8907_cells[] = {
 	{ .name = "max8907-adc", },
+	{ .name = "max8907-leds", },
 	{ .name = "max8907-regulator", },
 	{ .name = "max8907-rtc", },
 };
include/linux/mfd/max8907.h +1 -1
index d960dfdd808ba..15901a1b07424 100644
@@ -112,7 +112,7 @@
 #define MAX8907_REG_CHG_IRQ2_MASK	0x81
 #define MAX8907_REG_CHG_STAT		0x82
 #define MAX8907_REG_WLED_MODE_CNTL	0x84
-#define MAX8907_REG_ILED_CNTL		0x84
+#define MAX8907_REG_WLED_CNTL		0x85
 #define MAX8907_REG_II1RR		0x8E
 #define MAX8907_REG_II2RR		0x8F
 #define MAX8907_REG_LDOCTL20		0x9C
Signature · 1 line
2.53.0