diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2014-01-20 10:22:56 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2014-01-20 10:22:56 +0000 |
commit | e4e8b26a37ff4a11fda4f6095807cb0b68170d6e (patch) | |
tree | 56eb0e94bdcb12511ea518e5b52e0e46d28867b6 /target/linux/generic/files/include | |
parent | 313b62670594f5c9f77ceb46d90a3ef4537b0be5 (diff) | |
download | master-187ad058-e4e8b26a37ff4a11fda4f6095807cb0b68170d6e.tar.gz master-187ad058-e4e8b26a37ff4a11fda4f6095807cb0b68170d6e.tar.bz2 master-187ad058-e4e8b26a37ff4a11fda4f6095807cb0b68170d6e.zip |
generic: ar8216: add custom LED support for the AR8327 switch
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39338 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/include')
-rw-r--r-- | target/linux/generic/files/include/linux/ar8216_platform.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/generic/files/include/linux/ar8216_platform.h b/target/linux/generic/files/include/linux/ar8216_platform.h index 23cd55b822..4935ad332c 100644 --- a/target/linux/generic/files/include/linux/ar8216_platform.h +++ b/target/linux/generic/files/include/linux/ar8216_platform.h @@ -76,6 +76,43 @@ struct ar8327_led_cfg { bool open_drain; }; +enum ar8327_led_num { + AR8327_LED_PHY0_0 = 0, + AR8327_LED_PHY0_1, + AR8327_LED_PHY0_2, + AR8327_LED_PHY1_0, + AR8327_LED_PHY1_1, + AR8327_LED_PHY1_2, + AR8327_LED_PHY2_0, + AR8327_LED_PHY2_1, + AR8327_LED_PHY2_2, + AR8327_LED_PHY3_0, + AR8327_LED_PHY3_1, + AR8327_LED_PHY3_2, + AR8327_LED_PHY4_0, + AR8327_LED_PHY4_1, + AR8327_LED_PHY4_2, +}; + +enum ar8327_led_mode { + AR8327_LED_MODE_HW = 0, + AR8327_LED_MODE_SW, +}; + +struct ar8327_led_info { + const char *name; + const char *default_trigger; + bool active_low; + enum ar8327_led_num led_num; + enum ar8327_led_mode mode; +}; + +#define AR8327_LED_INFO(_led, _mode, _name) { \ + .name = (_name), \ + .led_num = AR8327_LED_ ## _led, \ + .mode = AR8327_LED_MODE_ ## _mode \ +} + struct ar8327_platform_data { struct ar8327_pad_cfg *pad0_cfg; struct ar8327_pad_cfg *pad5_cfg; @@ -86,6 +123,9 @@ struct ar8327_platform_data { struct ar8327_led_cfg *led_cfg; int (*get_port_link)(unsigned port); + + unsigned num_leds; + const struct ar8327_led_info *leds; }; #endif /* AR8216_PLATFORM_H */
\ No newline at end of file |