// SPDX-License-Identifier: GPL-2.0-or-later /* * leds-ns2.c - Driver for the Network Space v2 (and parents) dual-GPIO LED * * Copyright (C) 2010 LaCie * * Author: Simon Guinot <sguinot@lacie.com> * * Based on leds-gpio.c by Raphael Assenat <raph@8d.com>
*/
/* * If the size of this structure or types of its members is changed, * the filling of array modval in function ns2_led_register must be changed * accordingly.
*/ struct ns2_led_modval {
u32 mode;
u32 cmd_level;
u32 slow_level;
} __packed;
/* * The Network Space v2 dual-GPIO LED is wired to a CPLD. Three different LED * modes are available: off, on and SATA activity blinking. The LED modes are * controlled through two GPIOs (command and slow): each combination of values * for the command/slow GPIOs corresponds to a LED mode.
*/
ret = fwnode_property_count_u32(node, "modes-map"); if (ret < 0 || ret % 3) {
dev_err(dev, "Missing or malformed modes-map for %pfw\n", node); return -EINVAL;
}
nmodes = ret / 3;
modval = devm_kcalloc(dev, nmodes, sizeof(*modval), GFP_KERNEL); if (!modval) return -ENOMEM;
MODULE_AUTHOR("Simon Guinot <sguinot@lacie.com>");
MODULE_DESCRIPTION("Network Space v2 LED driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:leds-ns2");
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-04-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.