@@ -842,8 +842,8 @@ config LEDS_TM1628
depends on SPI
depends on OF || COMPILE_TEST
help
- Say Y to enable support for Titan Micro Electronics TM1628
- LED controllers.
+ Say Y to enable support for Titan Micro Electronics TM1628 and
+ Fuda Hisi Microelectronics FD628 LED controllers.
They are 3-wire SPI devices controlling a two-dimensional grid of
LEDs. Dimming is applied to all outputs through an internal PWM.
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Titan Micro Electronics TM1628 LED controller
+ * Also compatible:
+ * Fuda Hisi Microelectronics FD628
*
* Copyright (c) 2019 Andreas Färber
*/
@@ -400,8 +402,18 @@ static const struct tm1628_info tm1628_info = {
.default_pwm = 0,
};
+static const struct tm1628_info fd628_info = {
+ .grid_mask = GENMASK(7, 1),
+ .seg_mask = GENMASK(14, 12) | GENMASK(10, 1),
+ .modes = tm1628_modes,
+ .default_mode = 3,
+ .pwm_map = tm1628_pwm_map,
+ .default_pwm = 0,
+};
+
static const struct of_device_id tm1628_spi_of_matches[] = {
{ .compatible = "titanmec,tm1628", .data = &tm1628_info },
+ { .compatible = "fdhisi,fd628", .data = &fd628_info },
{}
};
MODULE_DEVICE_TABLE(of, tm1628_spi_of_matches);
Add definition for FD628 chipset. Cc: sales@fdhisi.com Signed-off-by: Andreas Färber <afaerber@suse.de> --- drivers/leds/Kconfig | 4 ++-- drivers/leds/leds-tm1628.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) -- 2.16.4