#include <linux/ctype.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <uapi/linux/uleds.h>
#include <linux/of.h>
#include "leds.h"
static DEFINE_MUTEX(leds_lookup_lock);
static LIST_HEAD(leds_lookup_list);
static ssize_t brightness_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t brightness_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t size)
{ … }
static DEVICE_ATTR_RW(brightness);
static ssize_t max_brightness_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(max_brightness);
#ifdef CONFIG_LEDS_TRIGGERS
static BIN_ATTR(trigger, 0644, led_trigger_read, led_trigger_write, 0);
static struct bin_attribute *led_trigger_bin_attrs[] = …;
static const struct attribute_group led_trigger_group = …;
#endif
static struct attribute *led_class_attrs[] = …;
static const struct attribute_group led_group = …;
static const struct attribute_group *led_groups[] = …;
#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
static ssize_t brightness_hw_changed_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(brightness_hw_changed);
static int led_add_brightness_hw_changed(struct led_classdev *led_cdev)
{ … }
static void led_remove_brightness_hw_changed(struct led_classdev *led_cdev)
{ … }
void led_classdev_notify_brightness_hw_changed(struct led_classdev *led_cdev, unsigned int brightness)
{ … }
EXPORT_SYMBOL_GPL(…);
#else
static int led_add_brightness_hw_changed(struct led_classdev *led_cdev)
{
return 0;
}
static void led_remove_brightness_hw_changed(struct led_classdev *led_cdev)
{
}
#endif
void led_classdev_suspend(struct led_classdev *led_cdev)
{ … }
EXPORT_SYMBOL_GPL(…);
void led_classdev_resume(struct led_classdev *led_cdev)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_PM_SLEEP
static int led_suspend(struct device *dev)
{ … }
static int led_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(leds_class_dev_pm_ops, led_suspend, led_resume);
static struct led_classdev *led_module_get(struct device *led_dev)
{ … }
static const struct class leds_class = …;
struct led_classdev *of_led_get(struct device_node *np, int index)
{ … }
EXPORT_SYMBOL_GPL(…);
void led_put(struct led_classdev *led_cdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void devm_led_release(struct device *dev, void *res)
{ … }
static struct led_classdev *__devm_led_get(struct device *dev, struct led_classdev *led)
{ … }
struct led_classdev *__must_check devm_of_led_get(struct device *dev,
int index)
{ … }
EXPORT_SYMBOL_GPL(…);
struct led_classdev *led_get(struct device *dev, char *con_id)
{ … }
EXPORT_SYMBOL_GPL(…);
struct led_classdev *devm_led_get(struct device *dev, char *con_id)
{ … }
EXPORT_SYMBOL_GPL(…);
void led_add_lookup(struct led_lookup_data *led_lookup)
{ … }
EXPORT_SYMBOL_GPL(…);
void led_remove_lookup(struct led_lookup_data *led_lookup)
{ … }
EXPORT_SYMBOL_GPL(…);
struct led_classdev *__must_check devm_of_led_get_optional(struct device *dev,
int index)
{ … }
EXPORT_SYMBOL_GPL(…);
static int led_classdev_next_name(const char *init_name, char *name,
size_t len)
{ … }
int led_classdev_register_ext(struct device *parent,
struct led_classdev *led_cdev,
struct led_init_data *init_data)
{ … }
EXPORT_SYMBOL_GPL(…);
void led_classdev_unregister(struct led_classdev *led_cdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static void devm_led_classdev_release(struct device *dev, void *res)
{ … }
int devm_led_classdev_register_ext(struct device *parent,
struct led_classdev *led_cdev,
struct led_init_data *init_data)
{ … }
EXPORT_SYMBOL_GPL(…);
static int devm_led_classdev_match(struct device *dev, void *res, void *data)
{ … }
void devm_led_classdev_unregister(struct device *dev,
struct led_classdev *led_cdev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init leds_init(void)
{ … }
static void __exit leds_exit(void)
{ … }
subsys_initcall(leds_init);
module_exit(leds_exit);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;