#include <linux/module.h>
#include <linux/irq.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/gpio/consumer.h>
#include <linux/leds.h>
#include <linux/of.h>
#include <linux/of_platform.h>
struct netxbig_gpio_ext { … };
enum netxbig_led_mode { … };
#define NETXBIG_LED_INVALID_MODE …
struct netxbig_led_timer { … };
struct netxbig_led { … };
struct netxbig_led_platform_data { … };
static DEFINE_SPINLOCK(gpio_ext_lock);
static void gpio_ext_set_addr(struct netxbig_gpio_ext *gpio_ext, int addr)
{ … }
static void gpio_ext_set_data(struct netxbig_gpio_ext *gpio_ext, int data)
{ … }
static void gpio_ext_enable_select(struct netxbig_gpio_ext *gpio_ext)
{ … }
static void gpio_ext_set_value(struct netxbig_gpio_ext *gpio_ext,
int addr, int value)
{ … }
struct netxbig_led_data { … };
static int netxbig_led_get_timer_mode(enum netxbig_led_mode *mode,
unsigned long delay_on,
unsigned long delay_off,
struct netxbig_led_timer *timer,
int num_timer)
{ … }
static int netxbig_led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off)
{ … }
static void netxbig_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
{ … }
static ssize_t sata_store(struct device *dev,
struct device_attribute *attr,
const char *buff, size_t count)
{ … }
static ssize_t sata_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(sata);
static struct attribute *netxbig_led_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int create_netxbig_led(struct platform_device *pdev,
struct netxbig_led_platform_data *pdata,
struct netxbig_led_data *led_dat,
const struct netxbig_led *template)
{ … }
static void netxbig_gpio_ext_remove(void *data)
{ … }
static int netxbig_gpio_ext_get(struct device *dev,
struct device *gpio_ext_dev,
struct netxbig_gpio_ext *gpio_ext)
{ … }
static int netxbig_leds_get_of_pdata(struct device *dev,
struct netxbig_led_platform_data *pdata)
{ … }
static const struct of_device_id of_netxbig_leds_match[] = …;
MODULE_DEVICE_TABLE(of, of_netxbig_leds_match);
static int netxbig_led_probe(struct platform_device *pdev)
{ … }
static struct platform_driver netxbig_led_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;