lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Dec 2019 04:39:39 +0100
From:   Andreas Färber <afaerber@...e.de>
To:     linux-realtek-soc@...ts.infradead.org, linux-leds@...r.kernel.org
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Andreas Färber <afaerber@...e.de>,
        sales@...isi.com
Subject: [RFC 12/25] leds: tm1628: Add Fuda Hisi Microelectronics FD628

Add definition for FD628 chipset.

Cc: sales@...isi.com
Signed-off-by: Andreas Färber <afaerber@...e.de>
---
 drivers/leds/Kconfig       |  4 ++--
 drivers/leds/leds-tm1628.c | 12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index f3afb419a9a1..a7695d961d9c 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -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.
 
diff --git a/drivers/leds/leds-tm1628.c b/drivers/leds/leds-tm1628.c
index 319bf34ce835..ef85712a84f2 100644
--- a/drivers/leds/leds-tm1628.c
+++ b/drivers/leds/leds-tm1628.c
@@ -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);
-- 
2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ