leds: max5970: Add support for max5970
PATCH v5 1/1 leds: max5970: Add support for max5970
From: Patrick Rudolph <[email protected]>
The MAX5970 is hot swap controller and has 4 indication LED.
---
Changes in V5:
- Replace -EPROBE_DEFER with -ENODEV
Changes in V4:
- Compact declaration of variable to single line
- Use sizeof(*ddata) instead of sizeof(struct max5970_led).
- Use the shorter 'dev' version whilst it's available Changes in V3:
- Drop array for ddata variable.
Changes in V2:
- Add of_node_put before return.
- Code cleanup
- Refactor code & remove max5970_setup_led function.
--- drivers/leds/Kconfig | 11 ++++ drivers/leds/Makefile | 1 + drivers/leds/leds-max5970.c | 109 ++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 drivers/leds/leds-max5970.c
drivers/leds/Kconfig +11 -0
@@ -638,6 +638,17 @@ config LEDS_ADP5520 To compile this driver as a module, choose M here: the module will be called leds-adp5520. +config LEDS_MAX5970 + tristate "LED Support for Maxim 5970" + depends on LEDS_CLASS + depends on MFD_MAX5970 + help + This option enables support for the Maxim MAX5970 & MAX5978 smart + switch indication LEDs via the I2C bus. + + To compile this driver as a module, choose M here: the module will + be called leds-max5970. + config LEDS_MC13783 tristate "LED Support for MC13XXX PMIC" depends on LEDS_CLASS
drivers/leds/Makefile +1 -0
@@ -56,6 +56,7 @@ obj-$(CONFIG_LEDS_LP8501) += leds-lp8501.o obj-$(CONFIG_LEDS_LP8788) += leds-lp8788.o obj-$(CONFIG_LEDS_LP8860) += leds-lp8860.o obj-$(CONFIG_LEDS_LT3593) += leds-lt3593.o +obj-$(CONFIG_LEDS_MAX5970) += leds-max5970.o obj-$(CONFIG_LEDS_MAX77650) += leds-max77650.o obj-$(CONFIG_LEDS_MAX8997) += leds-max8997.o obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o
drivers/leds/leds-max5970.c new file +109 -0
109 lines not on this page · raw message
base-commit: b9604be241587fb29c0f40450e53d0a37dc611b5
Signature · 1 line
2.41.0
Re: (subset) [PATCH v5] leds: max5970: Add support for max5970
Quoted 3 lines · Naresh Solanki
The MAX5970 is hot swap controller and has 4 indication LED.
Applied, thanks!
[1/1] leds: max5970: Add support for max5970
commit: 8171710be2d04fdc263da49212d7b875d3688f58
--
Lee Jones [李琼斯]