linux/drivers/leds/leds-ns2.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * leds-ns2.c - Driver for the Network Space v2 (and parents) dual-GPIO LED
 *
 * Copyright (C) 2010 LaCie
 *
 * Author: Simon Guinot <[email protected]>
 *
 * Based on leds-gpio.c by Raphael Assenat <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/gpio/consumer.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/of.h>
#include "leds.h"

enum ns2_led_modes {};

/*
 * If the size of this structure or types of its members is changed,
 * the filling of array modval in function ns2_led_register must be changed
 * accordingly.
 */
struct ns2_led_modval {} __packed;

/*
 * The Network Space v2 dual-GPIO LED is wired to a CPLD. Three different LED
 * modes are available: off, on and SATA activity blinking. The LED modes are
 * controlled through two GPIOs (command and slow): each combination of values
 * for the command/slow GPIOs corresponds to a LED mode.
 */

struct ns2_led {};

static int ns2_led_get_mode(struct ns2_led *led, enum ns2_led_modes *mode)
{}

static void ns2_led_set_mode(struct ns2_led *led, enum ns2_led_modes mode)
{}

static void ns2_led_set(struct led_classdev *led_cdev,
			enum led_brightness value)
{}

static int ns2_led_set_blocking(struct led_classdev *led_cdev,
			enum led_brightness value)
{}

static ssize_t ns2_led_sata_store(struct device *dev,
				  struct device_attribute *attr,
				  const char *buff, size_t count)
{}

static ssize_t ns2_led_sata_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR(sata, 0644, ns2_led_sata_show, ns2_led_sata_store);

static struct attribute *ns2_led_attrs[] =;
ATTRIBUTE_GROUPS();

static int ns2_led_register(struct device *dev, struct fwnode_handle *node,
			    struct ns2_led *led)
{}

static int ns2_led_probe(struct platform_device *pdev)
{}

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

static struct platform_driver ns2_led_driver =;

module_platform_driver();

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