linux/drivers/leds/rgb/leds-group-multicolor.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Multi-color LED built with monochromatic LED devices
 *
 * This driver groups several monochromatic LED devices in a single multicolor LED device.
 *
 * Compared to handling this grouping in user-space, the benefits are:
 * - The state of the monochromatic LED relative to each other is always consistent.
 * - The sysfs interface of the LEDs can be used for the group as a whole.
 *
 * Copyright 2023 Jean-Jacques Hiblot <[email protected]>
 */

#include <linux/err.h>
#include <linux/leds.h>
#include <linux/led-class-multicolor.h>
#include <linux/math.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>

struct leds_multicolor {};

static int leds_gmc_set(struct led_classdev *cdev, enum led_brightness brightness)
{}

static void restore_sysfs_write_access(void *data)
{}

static int leds_gmc_probe(struct platform_device *pdev)
{}

static const struct of_device_id of_leds_group_multicolor_match[] =;
MODULE_DEVICE_TABLE(of, of_leds_group_multicolor_match);

static struct platform_driver leds_group_multicolor_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();