@@ -0,0 +1,624 @@
+// SPDX-License-Identifier: GPL-2.0
+// (C) 2022 Pali Rohár <pali@kernel.org>
+//
+// CZ.NIC's Turris 1.x LEDs driver, controlled by CPLD firmware:
+// https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v
+
+#include <linux/bitops.h>
+#include <linux/bits.h>
+#include <linux/cleanup.h>
+#include <linux/container_of.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/kstrtox.h>
+#include <linux/led-class-multicolor.h>
+#include <linux/leds.h>
+#include <linux/limits.h>
+#include <linux/lockdep.h>
+#include <linux/math.h>
+#include <linux/minmax.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/spinlock.h>
+#include <linux/sysfs.h>
+#include <linux/types.h>
+
+/* Addresses in the CPLD memory map, the LED registers start at 0x13 */
+#define TURRIS1X_LED_REG_BASE 0x13
+#define TURRIS1X_LED_COLOR_REG 0x13
+#define TURRIS1X_LED_GLOBAL_LEVEL_REG 0x20
+#define TURRIS1X_LED_GLOBAL_BRIGHTNESS_REG 0x21
+#define TURRIS1X_LED_SW_OVERRIDE_REG 0x22
+/* Called led_sw_enable in the CPLD source, but a set bit turns the LED off */
+#define TURRIS1X_LED_SW_DISABLE_REG 0x23
+/* 0x28 + N holds the value of level N (level 7 - N in the CPLD source) */
+#define TURRIS1X_LED_LEVEL_VALUE_REG 0x28
+
+#define TURRIS1X_LED_NUM 8
+#define TURRIS1X_LED_NUM_COLORS 3
+#define TURRIS1X_LED_NUM_LEVELS 8
+#define TURRIS1X_LED_GLOBAL_LEVEL_MASK GENMASK(2, 0)
+/* Blocks of colour registers: LED 0, LEDs 1-5 (shared), LED 6 and LED 7 */
+#define TURRIS1X_LED_NUM_COLOR_BLOCKS 4
+/* LEDs 1-5 are LAN 5 to LAN 1, as described in the binding */
+#define TURRIS1X_LED_LAN5 1
+#define TURRIS1X_LED_LAN1 5
+#define TURRIS1X_LED_WIFI 6
+
+struct turris1x_led {
+ struct led_classdev_mc mc_cdev;
+ struct mc_subled subled_info[TURRIS1X_LED_NUM_COLORS];
+ u8 reg;
+ bool registered;
+ /* Set when software has the LED on, i.e. its SW_DISABLE bit is clear */
+ bool on;
+ /* Set when the hardware trigger drives this LED */
+ bool hwtrig;
+};
+
+#define to_turris1x_led(cdev) \
+ container_of(lcdev_to_mccdev(cdev), struct turris1x_led, mc_cdev)
+
+struct turris1x_leds {
+ void __iomem *regs;
+ /* Protects the CPLD LED registers and @reset */
+ spinlock_t lock;
+ /*
+ * Set by turris1x_leds_reset(). LED triggers keep running after
+ * .shutdown(), so once this is set the callbacks leave the LED
+ * registers alone.
+ */
+ bool reset;
+ struct turris1x_led led[TURRIS1X_LED_NUM];
+};
+
+static struct led_hw_trigger_type turris1x_hw_trigger_type;
+
+static u8 turris1x_read(struct turris1x_leds *ddata, unsigned int reg)
+{
+ return readb(ddata->regs + reg - TURRIS1X_LED_REG_BASE);
+}
+
+static void turris1x_write(struct turris1x_leds *ddata, unsigned int reg, u8 val)
+{
+ writeb(val, ddata->regs + reg - TURRIS1X_LED_REG_BASE);
+}
+
+/* Set or clear one bit of a CPLD register */
+static void turris1x_assign_bit(struct turris1x_leds *ddata, unsigned int reg,
+ unsigned int bit, bool value)
+{
+ unsigned long val;
+
+ lockdep_assert_held(&ddata->lock);
+
+ val = turris1x_read(ddata, reg);
+ __assign_bit(bit, &val, value);
+ turris1x_write(ddata, reg, val);
+}
+
+/* Block of three colour registers (red, green, blue) that each LED uses */
+static const u8 turris1x_color_block[TURRIS1X_LED_NUM] = {
+ 0, /* WAN */
+ 1, 1, 1, 1, 1, /* LAN 1-5 share one block */
+ 2, /* WiFi */
+ 3, /* power */
+};
+
+static unsigned int turris1x_color_reg(u32 led, unsigned int color)
+{
+ return TURRIS1X_LED_COLOR_REG + turris1x_color_block[led] * TURRIS1X_LED_NUM_COLORS + color;
+}
+
+static bool turris1x_led_is_lan(u32 led)
+{
+ return led >= TURRIS1X_LED_LAN5 && led <= TURRIS1X_LED_LAN1;
+}
+
+/* LAN 2-5 have no colour of their own, they show the colour of LAN 1 */
+static bool turris1x_led_has_color(u32 led)
+{
+ return !turris1x_led_is_lan(led) || led == TURRIS1X_LED_LAN1;
+}
+
+static void turris1x_led_set_colors(struct turris1x_leds *ddata, struct turris1x_led *led,
+ enum led_brightness brightness)
+{
+ struct led_classdev_mc *mc_cdev = &led->mc_cdev;
+
+ lockdep_assert_held(&ddata->lock);
+
+ led_mc_calc_color_components(mc_cdev, brightness);
+
+ /* The colour registers are 8 bits wide, do not let values wrap */
+ for (unsigned int i = 0; i < TURRIS1X_LED_NUM_COLORS; i++) {
+ u8 val = min(mc_cdev->subled_info[i].brightness, U8_MAX);
+
+ turris1x_write(ddata, turris1x_color_reg(led->reg, i), val);
+ }
+}
+
+static int turris1x_hwtrig_activate(struct led_classdev *cdev)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(cdev->dev->parent);
+ struct turris1x_led *led = to_turris1x_led(cdev);
+
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ if (ddata->reset)
+ return 0;
+
+ /*
+ * If software turned the LED off, the last configured colour was not
+ * necessarily written to the CPLD. Write it with max_brightness before
+ * the hardware takes over. LAN 1 writes its colour on every brightness
+ * change, and LAN 2-5 have no colour of their own.
+ */
+ if (!turris1x_led_is_lan(led->reg) && !led->on)
+ turris1x_led_set_colors(ddata, led, cdev->max_brightness);
+
+ /* Disable LED software control */
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_OVERRIDE_REG, led->reg, false);
+
+ led->hwtrig = true;
+
+ return 0;
+}
+
+static void turris1x_hwtrig_deactivate(struct led_classdev *cdev)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(cdev->dev->parent);
+ struct turris1x_led *led = to_turris1x_led(cdev);
+
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ if (ddata->reset)
+ return;
+
+ led->hwtrig = false;
+
+ /*
+ * Turn the LED off before software control takes over, as the LED core
+ * does right after anyway.
+ */
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_DISABLE_REG, led->reg, true);
+ led->on = false;
+
+ /* Enable LED software control */
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_OVERRIDE_REG, led->reg, true);
+}
+
+static bool turris1x_hwtrig_hw_offloaded(struct led_classdev *cdev)
+{
+ return true;
+}
+
+static struct led_trigger turris1x_hw_trigger = {
+ .name = "turris1x-cpld",
+ .activate = turris1x_hwtrig_activate,
+ .deactivate = turris1x_hwtrig_deactivate,
+ .hw_offloaded = turris1x_hwtrig_hw_offloaded,
+ .trigger_type = &turris1x_hw_trigger_type,
+};
+
+static void turris1x_led_brightness_set(struct led_classdev *cdev, enum led_brightness brightness)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(cdev->dev->parent);
+ struct turris1x_led *led = to_turris1x_led(cdev);
+
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ /* Software triggers run until the reboot, do not undo the reset */
+ if (ddata->reset)
+ return;
+
+ /*
+ * Write the colours when the LED is on, and also when the hardware
+ * trigger drives it, as the trigger uses the same registers. LAN 1
+ * always writes its full intensities, also when it is off, as LAN 2-5
+ * show its colour.
+ */
+ if (led->reg == TURRIS1X_LED_LAN1)
+ turris1x_led_set_colors(ddata, led, cdev->max_brightness);
+ else if (turris1x_led_has_color(led->reg) && (brightness || led->hwtrig))
+ turris1x_led_set_colors(ddata, led, brightness ?: cdev->max_brightness);
+
+ /*
+ * Enable or disable the LED under software control. The CPLD ignores
+ * this bit while the hardware trigger drives the LED, so leave it
+ * alone.
+ */
+ if (!led->hwtrig) {
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_DISABLE_REG, led->reg, !brightness);
+ led->on = !!brightness;
+ }
+}
+
+static int turris1x_led_register(struct device *dev, struct turris1x_leds *ddata,
+ struct fwnode_handle *fwnode, u8 val_sw_override,
+ u8 val_sw_disable)
+{
+ static const unsigned int colors[TURRIS1X_LED_NUM_COLORS] = {
+ LED_COLOR_ID_RED, LED_COLOR_ID_GREEN, LED_COLOR_ID_BLUE,
+ };
+ struct led_init_data init_data = {};
+ struct led_classdev *cdev;
+ struct turris1x_led *led;
+ u32 reg, color;
+ int ret;
+ u8 val;
+
+ ret = fwnode_property_read_u32(fwnode, "reg", ®);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to read 'reg'\n");
+ if (reg >= TURRIS1X_LED_NUM)
+ return dev_err_probe(dev, -EINVAL, "Invalid 'reg' %u\n", reg);
+
+ ret = fwnode_property_read_u32(fwnode, "color", &color);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to read 'color'\n");
+ if (color != LED_COLOR_ID_RGB)
+ return dev_err_probe(dev, -EINVAL, "Invalid 'color' %u\n", color);
+
+ led = &ddata->led[reg];
+ if (led->registered)
+ return dev_err_probe(dev, -EEXIST, "LED %u already registered\n", reg);
+
+ led->reg = reg;
+
+ init_data.fwnode = fwnode;
+
+ cdev = &led->mc_cdev.led_cdev;
+ cdev->brightness_set = turris1x_led_brightness_set;
+
+ /*
+ * LEDs 1-5 (LAN) share one set of colour registers, and the CPLD can
+ * only switch each of them on and off. LAN 1 is a multicolor LED whose
+ * colour is the colour of all five, LAN 2-5 are plain LEDs, and all
+ * five have max_brightness 1. The other LEDs have colour registers of
+ * their own and scale their colour by the brightness.
+ */
+ cdev->max_brightness = turris1x_led_is_lan(reg) ? 1 : 255;
+
+ if (turris1x_led_has_color(reg)) {
+ /* Set the initial colours to those currently in use */
+ for (unsigned int i = 0; i < TURRIS1X_LED_NUM_COLORS; i++) {
+ led->subled_info[i].intensity =
+ turris1x_read(ddata, turris1x_color_reg(reg, i));
+ /*
+ * LAN 1 does not scale its colour, so its intensities
+ * are not limited by max_brightness but by the 8-bit
+ * colour registers.
+ */
+ if (reg == TURRIS1X_LED_LAN1)
+ led->subled_info[i].max_intensity = U8_MAX;
+ led->subled_info[i].color_index = colors[i];
+ led->subled_info[i].channel = i;
+ }
+
+ led->mc_cdev.subled_info = led->subled_info;
+ led->mc_cdev.num_colors = TURRIS1X_LED_NUM_COLORS;
+ }
+
+ /* All LEDs except the WiFi LED can be driven by the hardware trigger */
+ if (reg != TURRIS1X_LED_WIFI) {
+ cdev->trigger_type = &turris1x_hw_trigger_type;
+ cdev->hw_control_trigger = turris1x_hw_trigger.name;
+ }
+
+ if (!(val_sw_override & BIT(reg)))
+ cdev->default_trigger = turris1x_hw_trigger.name;
+
+ if (!(val_sw_override & BIT(reg)) || !(val_sw_disable & BIT(reg)))
+ cdev->brightness = cdev->max_brightness;
+
+ led->on = !(val_sw_disable & BIT(reg));
+
+ if (turris1x_led_has_color(reg))
+ ret = devm_led_classdev_multicolor_register_ext(dev, &led->mc_cdev, &init_data);
+ else
+ ret = devm_led_classdev_register_ext(dev, cdev, &init_data);
+ if (ret)
+ return dev_err_probe(dev, ret, "Cannot register LED %u\n", reg);
+
+ /*
+ * A linux,default-trigger property replaces the hardware trigger, and
+ * the CPLD then keeps driving the LED and ignores software control.
+ * Take such an LED over in the state the LED core reports.
+ */
+ scoped_guard(spinlock_irqsave, &ddata->lock) {
+ val = turris1x_read(ddata, TURRIS1X_LED_SW_OVERRIDE_REG);
+ if (!led->hwtrig && !(val & BIT(reg))) {
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_DISABLE_REG, reg,
+ !cdev->brightness);
+ led->on = !!cdev->brightness;
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_OVERRIDE_REG, reg, true);
+ }
+ }
+
+ led->registered = true;
+
+ return 0;
+}
+
+static ssize_t brightness_show(struct device *dev, struct device_attribute *a, char *buf)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(dev);
+ u8 brightness;
+
+ /* The CPLD has the value of the level in use in a read-only register */
+ brightness = turris1x_read(ddata, TURRIS1X_LED_GLOBAL_BRIGHTNESS_REG);
+
+ return sysfs_emit(buf, "%u\n", brightness);
+}
+
+static ssize_t brightness_store(struct device *dev, struct device_attribute *a,
+ const char *buf, size_t count)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(dev);
+ int best_error, error, value;
+ unsigned int best_level;
+ u8 brightness;
+ int ret;
+
+ ret = kstrtou8(buf, 10, &brightness);
+ if (ret)
+ return ret;
+
+ /*
+ * The global brightness can only be one of the values of the levels.
+ * Select the level whose value is nearest to the requested brightness.
+ */
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ best_level = 0;
+ best_error = INT_MAX;
+ for (unsigned int level = 0; level < TURRIS1X_LED_NUM_LEVELS; level++) {
+ value = turris1x_read(ddata, TURRIS1X_LED_LEVEL_VALUE_REG + level);
+ error = abs(value - brightness);
+ if (error < best_error) {
+ best_error = error;
+ best_level = level;
+ }
+ }
+
+ turris1x_write(ddata, TURRIS1X_LED_GLOBAL_LEVEL_REG, best_level);
+
+ return count;
+}
+static DEVICE_ATTR_RW(brightness);
+
+static ssize_t brightness_level_show(struct device *dev, struct device_attribute *a, char *buf)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(dev);
+ u8 level;
+
+ level = turris1x_read(ddata, TURRIS1X_LED_GLOBAL_LEVEL_REG);
+ level &= TURRIS1X_LED_GLOBAL_LEVEL_MASK;
+
+ return sysfs_emit(buf, "%u\n", level);
+}
+
+static ssize_t brightness_level_store(struct device *dev, struct device_attribute *a,
+ const char *buf, size_t count)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(dev);
+ u8 level;
+ int ret;
+
+ ret = kstrtou8(buf, 10, &level);
+ if (ret)
+ return ret;
+
+ if (level >= TURRIS1X_LED_NUM_LEVELS)
+ return -EINVAL;
+
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ turris1x_write(ddata, TURRIS1X_LED_GLOBAL_LEVEL_REG, level);
+
+ return count;
+}
+static DEVICE_ATTR_RW(brightness_level);
+
+/* One file per level under brightness_levels/, holding its value */
+struct turris1x_level_attr {
+ struct device_attribute attr;
+ u8 level;
+};
+
+#define to_turris1x_level_attr(a) \
+ container_of(a, struct turris1x_level_attr, attr)
+
+static ssize_t brightness_level_value_show(struct device *dev, struct device_attribute *a,
+ char *buf)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(dev);
+ struct turris1x_level_attr *la = to_turris1x_level_attr(a);
+ u8 value;
+
+ value = turris1x_read(ddata, TURRIS1X_LED_LEVEL_VALUE_REG + la->level);
+
+ return sysfs_emit(buf, "%u\n", value);
+}
+
+static ssize_t brightness_level_value_store(struct device *dev, struct device_attribute *a,
+ const char *buf, size_t count)
+{
+ struct turris1x_leds *ddata = dev_get_drvdata(dev);
+ struct turris1x_level_attr *la = to_turris1x_level_attr(a);
+ u8 value;
+ int ret;
+
+ ret = kstrtou8(buf, 10, &value);
+ if (ret)
+ return ret;
+
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ turris1x_write(ddata, TURRIS1X_LED_LEVEL_VALUE_REG + la->level, value);
+
+ return count;
+}
+
+/* _level is always a literal 0..7, it is pasted, stringified and stored */
+#define TURRIS1X_LEVEL_ATTR(_level) \
+ static struct turris1x_level_attr turris1x_level_attr_##_level = { \
+ .attr = __ATTR(_level, 0644, brightness_level_value_show, \
+ brightness_level_value_store), \
+ .level = _level, \
+ }
+
+TURRIS1X_LEVEL_ATTR(0);
+TURRIS1X_LEVEL_ATTR(1);
+TURRIS1X_LEVEL_ATTR(2);
+TURRIS1X_LEVEL_ATTR(3);
+TURRIS1X_LEVEL_ATTR(4);
+TURRIS1X_LEVEL_ATTR(5);
+TURRIS1X_LEVEL_ATTR(6);
+TURRIS1X_LEVEL_ATTR(7);
+
+static struct attribute *turris1x_leds_levels_attrs[] = {
+ &turris1x_level_attr_0.attr.attr,
+ &turris1x_level_attr_1.attr.attr,
+ &turris1x_level_attr_2.attr.attr,
+ &turris1x_level_attr_3.attr.attr,
+ &turris1x_level_attr_4.attr.attr,
+ &turris1x_level_attr_5.attr.attr,
+ &turris1x_level_attr_6.attr.attr,
+ &turris1x_level_attr_7.attr.attr,
+ NULL
+};
+
+static const struct attribute_group turris1x_leds_levels_group = {
+ .name = "brightness_levels",
+ .attrs = turris1x_leds_levels_attrs,
+};
+
+static struct attribute *turris1x_leds_controller_attrs[] = {
+ &dev_attr_brightness.attr,
+ &dev_attr_brightness_level.attr,
+ NULL
+};
+
+static const struct attribute_group turris1x_leds_controller_group = {
+ .attrs = turris1x_leds_controller_attrs,
+};
+
+static const struct attribute_group *turris1x_leds_controller_groups[] = {
+ &turris1x_leds_controller_group,
+ &turris1x_leds_levels_group,
+ NULL
+};
+
+/*
+ * Give the LEDs back to the CPLD with full colours, as after power-on, but
+ * keep the WiFi LED under software control and off. Called when the driver
+ * goes away and at shutdown.
+ */
+static void turris1x_leds_reset(void *data)
+{
+ struct turris1x_leds *ddata = data;
+
+ guard(spinlock_irqsave)(&ddata->lock);
+
+ ddata->reset = true;
+
+ /* Disable software control of all LEDs except the WiFi LED */
+ turris1x_write(ddata, TURRIS1X_LED_SW_OVERRIDE_REG, BIT(TURRIS1X_LED_WIFI));
+
+ /* Turn off the WiFi LED, as there is no hardware trigger for it */
+ turris1x_assign_bit(ddata, TURRIS1X_LED_SW_DISABLE_REG, TURRIS1X_LED_WIFI, true);
+
+ /* Reset the colours of all LEDs to full intensity */
+ for (unsigned int i = 0; i < TURRIS1X_LED_NUM_COLOR_BLOCKS * TURRIS1X_LED_NUM_COLORS; i++)
+ turris1x_write(ddata, TURRIS1X_LED_COLOR_REG + i, U8_MAX);
+}
+
+static int turris1x_leds_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct turris1x_leds *ddata;
+ u8 val_sw_override, val_sw_disable;
+ int ret;
+
+ if (!device_get_child_node_count(dev))
+ return dev_err_probe(dev, -ENODEV, "No LED devices found in device tree\n");
+
+ ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
+ if (!ddata)
+ return -ENOMEM;
+
+ ddata->regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(ddata->regs))
+ return PTR_ERR(ddata->regs);
+
+ spin_lock_init(&ddata->lock);
+ platform_set_drvdata(pdev, ddata);
+
+ ret = devm_led_trigger_register(dev, &turris1x_hw_trigger);
+ if (ret)
+ return dev_err_probe(dev, ret, "Cannot register private LED trigger\n");
+
+ ret = devm_add_action_or_reset(dev, turris1x_leds_reset, ddata);
+ if (ret)
+ return ret;
+
+ scoped_guard(spinlock_irqsave, &ddata->lock) {
+ val_sw_override = turris1x_read(ddata, TURRIS1X_LED_SW_OVERRIDE_REG);
+ val_sw_disable = turris1x_read(ddata, TURRIS1X_LED_SW_DISABLE_REG);
+
+ /*
+ * The WiFi LED has no hardware trigger, put it under software
+ * control and turn it off.
+ */
+ if (!(val_sw_override & BIT(TURRIS1X_LED_WIFI))) {
+ val_sw_disable |= BIT(TURRIS1X_LED_WIFI);
+ val_sw_override |= BIT(TURRIS1X_LED_WIFI);
+ turris1x_write(ddata, TURRIS1X_LED_SW_DISABLE_REG, val_sw_disable);
+ turris1x_write(ddata, TURRIS1X_LED_SW_OVERRIDE_REG, val_sw_override);
+ }
+ }
+
+ device_for_each_child_node_scoped(dev, child) {
+ ret = turris1x_led_register(dev, ddata, child, val_sw_override, val_sw_disable);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
+/*
+ * A reboot resets the CPU, but the CPLD keeps the LED registers until
+ * power-on or the reset button. Give the LEDs back to the CPLD, so that the
+ * bootloader and the next kernel, also one started by kexec, do not get them
+ * as this kernel left them.
+ */
+static void turris1x_leds_shutdown(struct platform_device *pdev)
+{
+ turris1x_leds_reset(platform_get_drvdata(pdev));
+}
+
+static const struct of_device_id of_turris1x_leds_match[] = {
+ { .compatible = "cznic,turris1x-leds" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, of_turris1x_leds_match);
+
+static struct platform_driver turris1x_leds_driver = {
+ .probe = turris1x_leds_probe,
+ .shutdown = turris1x_leds_shutdown,
+ .driver = {
+ .name = "turris1x_leds",
+ .of_match_table = of_turris1x_leds_match,
+ .dev_groups = turris1x_leds_controller_groups,
+ },
+};
+module_platform_driver(turris1x_leds_driver);
+
+MODULE_AUTHOR("Pali Rohár <pali@kernel.org>");
+MODULE_DESCRIPTION("CZ.NIC's Turris 1.x LEDs");
+MODULE_LICENSE("GPL");