Page MenuHomeFreeBSD

Add gpioled default-state support
ClosedPublic

Authored by john-feith.com on May 22 2015, 3:12 AM.
Tags
Referenced Files
Unknown Object (File)
Wed, Dec 18, 4:10 AM
Unknown Object (File)
Wed, Dec 18, 3:22 AM
Unknown Object (File)
Oct 28 2024, 9:50 PM
Unknown Object (File)
Oct 1 2024, 4:18 AM
Unknown Object (File)
Sep 18 2024, 7:27 PM
Unknown Object (File)
Sep 18 2024, 8:01 AM
Unknown Object (File)
Sep 14 2024, 4:29 PM
Unknown Object (File)
Sep 8 2024, 9:52 PM
Subscribers

Details

Reviewers
gonzo
ganbold
loos
Summary

This implements default-state support as described at:

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.

I 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

Looking through the source tree this should have no effect on acpi_asus_attach
which only calls led_create_state with state set to 1. I've updated acpi_ibm_attach
in order to avoid surprises ... the ibm change is untested as I lack the proper hardware.

Test Plan

Tested on VSATV102 (aml8726-m6).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

john-feith.com retitled this revision from to Add gpioled default-state support.
john-feith.com updated this object.
john-feith.com edited the test plan for this revision. (Show Details)
john-feith.com added a reviewer: ganbold.
john-feith.com set the repository for this revision to rS FreeBSD src repository - subversion.
john-feith.com added a project: ARM.
gonzo edited edge metadata.

Looks OK

This revision is now accepted and ready to land.May 22 2015, 3:47 AM
loos edited edge metadata.

Looks good to me.

ganbold closed this revision.
ganbold edited edge metadata.