ar71xx: add LED driver NU801
[openwrt.git] / target / linux / ar71xx / files / include / linux / leds-nu801.h
1 #ifndef __LEDS_NU801_H__
2 #define __LEDS_NU801_H__
3
4 /*
5  * Definitions for LED driver for NU801
6  *
7  * Kevin Paul Herbert
8  * Copyright (c) 2012, Meraki, Inc.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  *
14  */
15
16 #include <linux/leds.h>
17
18 struct led_nu801_template {
19         const char *device_name;        /* Name of the platform device */
20         const char *name;       /* Name of this LED chain */
21         int num_leds;           /* Number of LEDs in the chain */
22         unsigned cki;           /* GPIO pin for CKI */
23         unsigned sdi;           /* GPIO pin for SDI */
24         int lei;                /* GPIO pin for LEI; < 0 if none */
25         u32 ndelay;             /* Delay in nanoseconds */
26         enum led_brightness init_brightness[3]; /* Default rgb state */
27 #ifdef CONFIG_LEDS_TRIGGERS
28         const char *default_trigger; /* default trigger */
29 #endif
30         const char *led_colors[3];  /* rgb color order */
31 };
32
33 struct led_nu801_platform_data {
34         int num_controllers;    /* Numnber of controllers */
35         struct led_nu801_template *template; /* Template per controller */
36 };
37
38 #endif /* __LEDS_NU801_H__ */