summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi_support
diff options
context:
space:
mode:
authorganbold <ganbold@FreeBSD.org>2015-05-24 07:45:42 +0000
committerganbold <ganbold@FreeBSD.org>2015-05-24 07:45:42 +0000
commitb3dcb943c4b3562db28255732cc34b27b51db46e (patch)
treea53d7f1b99a7ab76d9db828c32eaac6a69db9eb4 /sys/dev/acpi_support
parent32ec61f4a321dcbf084978e1841a78162ba43b42 (diff)
downloadFreeBSD-src-b3dcb943c4b3562db28255732cc34b27b51db46e.zip
FreeBSD-src-b3dcb943c4b3562db28255732cc34b27b51db46e.tar.gz
This implements default-state support as described in:
https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txt Without this booting the VSATV102 causes the blue "working" led to turn off when the kernel starts up. With this the led (which is turned on by the firmware) stays on since that's the default state specified in the FDT. Expanded the meaning of the led_create_state state parameter in order to implement support for "keep". The original values were: == 0 Off != 0 On The new values are: == -1 don't change / keep current setting == 0 Off != -1 && != 0 On This should have no effect on acpi_asus_attach which only calls led_create_state with state set to 1. Updated acpi_ibm_attach in order to avoid surprises. Differential Revision: https://reviews.freebsd.org/D2615 Submitted by: John Wehle Reviewed by: gonzo, loos
Diffstat (limited to 'sys/dev/acpi_support')
-rw-r--r--sys/dev/acpi_support/acpi_ibm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/acpi_support/acpi_ibm.c b/sys/dev/acpi_support/acpi_ibm.c
index c69f8bf..c2f90d1 100644
--- a/sys/dev/acpi_support/acpi_ibm.c
+++ b/sys/dev/acpi_support/acpi_ibm.c
@@ -445,7 +445,8 @@ acpi_ibm_attach(device_t dev)
/* Hook up light to led(4) */
if (sc->light_set_supported)
- sc->led_dev = led_create_state(ibm_led, sc, "thinklight", sc->light_val);
+ sc->led_dev = led_create_state(ibm_led, sc, "thinklight",
+ (sc->light_val ? 1 : 0));
return (0);
}
OpenPOWER on IntegriCloud