18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * LED Kernel Default ON Trigger
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright 2008 Nick Forbes <nick.forbes@incepta.com>
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Based on Richard Purdie's ledtrig-timer.c.
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#include <linux/module.h>
118c2ecf20Sopenharmony_ci#include <linux/kernel.h>
128c2ecf20Sopenharmony_ci#include <linux/init.h>
138c2ecf20Sopenharmony_ci#include <linux/leds.h>
148c2ecf20Sopenharmony_ci#include "../leds.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_cistatic int defon_trig_activate(struct led_classdev *led_cdev)
178c2ecf20Sopenharmony_ci{
188c2ecf20Sopenharmony_ci	led_set_brightness_nosleep(led_cdev, led_cdev->max_brightness);
198c2ecf20Sopenharmony_ci	return 0;
208c2ecf20Sopenharmony_ci}
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_cistatic struct led_trigger defon_led_trigger = {
238c2ecf20Sopenharmony_ci	.name     = "default-on",
248c2ecf20Sopenharmony_ci	.activate = defon_trig_activate,
258c2ecf20Sopenharmony_ci};
268c2ecf20Sopenharmony_cimodule_led_trigger(defon_led_trigger);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciMODULE_AUTHOR("Nick Forbes <nick.forbes@incepta.com>");
298c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Default-ON LED trigger");
308c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2");
31