// SPDX-License-Identifier: GPL-2.0-only /* * arch/arm/mach-orion5x/board-d2net.c * * LaCie d2Network and Big Disk Network NAS setup * * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
*/
/* * The blue front LED is wired to the CPLD and can blink in relation with the * SATA activity. * * The following array detail the different LED registers and the combination * of their possible values: * * led_off | blink_ctrl | SATA active | LED state * | | | * 1 | x | x | off * 0 | 0 | 0 | off * 0 | 1 | 0 | blink (rate 300ms) * 0 | x | 1 | on * * Notes: The blue and the red front LED's can't be on at the same time. * Red LED have priority.
*/
staticvoid __init d2net_gpio_leds_init(void)
{ int err;
/* Configure register blink_ctrl to allow SATA activity LED blinking. */
err = gpio_request(D2NET_GPIO_BLUE_LED_BLINK_CTRL, "blue LED blink"); if (err == 0) {
err = gpio_direction_output(D2NET_GPIO_BLUE_LED_BLINK_CTRL, 1); if (err)
gpio_free(D2NET_GPIO_BLUE_LED_BLINK_CTRL);
} if (err)
pr_err("d2net: failed to configure blue LED blink GPIO\n");
/***************************************************************************** * General Setup
****************************************************************************/
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.