1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright 2016 Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
7 * Based on LED IDE-Disk Activity Trigger
9 * Copyright 2006 Openedhand Ltd.
11 * Author: Richard Purdie <rpurdie@openedhand.com>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/leds.h>
18 #define BLINK_DELAY 30
20 DEFINE_LED_TRIGGER(ledtrig_mtd
);
21 DEFINE_LED_TRIGGER(ledtrig_nand
);
23 void ledtrig_mtd_activity(void)
25 led_trigger_blink_oneshot(ledtrig_mtd
, BLINK_DELAY
, BLINK_DELAY
, 0);
26 led_trigger_blink_oneshot(ledtrig_nand
, BLINK_DELAY
, BLINK_DELAY
, 0);
28 EXPORT_SYMBOL(ledtrig_mtd_activity
);
30 static int __init
ledtrig_mtd_init(void)
32 led_trigger_register_simple("mtd", &ledtrig_mtd
);
33 led_trigger_register_simple("nand-disk", &ledtrig_nand
);
37 device_initcall(ledtrig_mtd_init
);