[LEDE-DEV] [PATCH] Add support for Comfast E380AC v1 and v2
Rafał Miłecki
zajec5 at gmail.com
Mon Oct 17 22:54:17 PDT 2016
On 17 October 2016 at 12:14, Gareth Parker <gareth41 at orcon.net.nz> wrote:
> The Comfast E380AC is a single port PoE Dual Band AP.
>
> There are two versions which are only identifiable through the web administration interface, v1 has 128mb ram and a uboot size of 128k, v2 has 256mb ram and a uboot size of 256k, the remaining hardware and PCB markings are the same.
Minor note: mb means milli-bits. You probably meant MiB which means mebi-bytes.
https://en.wikipedia.org/wiki/Metric_prefix
https://en.wikipedia.org/wiki/Binary_prefix
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
> index d6e257d..c8e6b48 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -82,6 +82,10 @@ get_status_led() {
> cf-e316n-v2)
> status_led="$board:blue:wan"
> ;;
> + cf-e380ac-v1|\
> + cf-e380ac-v2)
> + status_led="cfe380ac:green"
> + ;;
> cpe510)
> status_led="tp-link:green:link4"
> ;;
See comment below.
> +static struct gpio_led cf_e380ac_leds_gpio[] __initdata = {
> + {
> + .name = "cfe380ac:red",
> + .gpio = CF_E380AC_GPIO_LED_RED,
> + .active_low = 0,
> + },
> + {
> + .name = "cfe380ac:green",
> + .gpio = CF_E380AC_GPIO_LED_GREEN,
> + .active_low = 0,
> + },
> + {
> + .name = "cfe380ac:blue",
> + .gpio = CF_E380AC_GPIO_LED_BLUE,
> + .active_low = 0,
> + },
> +
> +};
What about functions of these LEDs? Take a look at
Documentation/leds/leds-class.txt, you should be using
"devicename:colour:function".
More information about the Lede-dev
mailing list