diff options
author | John Crispin <blogic@openwrt.org> | 2015-12-11 15:04:57 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-12-11 15:04:57 +0000 |
commit | 775ee20c1d2b60f854f605e8846186d13d7ad423 (patch) | |
tree | 659ad163c889d0bb3d946120633683434c3e02d5 /target/linux/ar71xx/files/include | |
parent | 6c8c0504855e51cca630dcb805156ddbf2404356 (diff) | |
download | master-187ad058-775ee20c1d2b60f854f605e8846186d13d7ad423.tar.gz master-187ad058-775ee20c1d2b60f854f605e8846186d13d7ad423.tar.bz2 master-187ad058-775ee20c1d2b60f854f605e8846186d13d7ad423.zip |
ar71xx: add LED driver NU801
The MR18 uses a 3-channel 16-bit PWM Constant Current Driver
for its status LED.
Signed-off-by: Chris R Blake <chrisrblake93@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47848 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/include')
-rw-r--r-- | target/linux/ar71xx/files/include/linux/leds-nu801.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/include/linux/leds-nu801.h b/target/linux/ar71xx/files/include/linux/leds-nu801.h new file mode 100644 index 0000000000..0fc310d277 --- /dev/null +++ b/target/linux/ar71xx/files/include/linux/leds-nu801.h @@ -0,0 +1,38 @@ +#ifndef __LEDS_NU801_H__ +#define __LEDS_NU801_H__ + +/* + * Definitions for LED driver for NU801 + * + * Kevin Paul Herbert + * Copyright (c) 2012, Meraki, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include <linux/leds.h> + +struct led_nu801_template { + const char *device_name; /* Name of the platform device */ + const char *name; /* Name of this LED chain */ + int num_leds; /* Number of LEDs in the chain */ + unsigned cki; /* GPIO pin for CKI */ + unsigned sdi; /* GPIO pin for SDI */ + int lei; /* GPIO pin for LEI; < 0 if none */ + u32 ndelay; /* Delay in nanoseconds */ + enum led_brightness init_brightness[3]; /* Default rgb state */ +#ifdef CONFIG_LEDS_TRIGGERS + const char *default_trigger; /* default trigger */ +#endif + const char *led_colors[3]; /* rgb color order */ +}; + +struct led_nu801_platform_data { + int num_controllers; /* Numnber of controllers */ + struct led_nu801_template *template; /* Template per controller */ +}; + +#endif /* __LEDS_NU801_H__ */ |