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, Apr 10, 1:18 AM
Unknown Object (File)
Mar 10 2024, 5:20 AM
Unknown Object (File)
Dec 25 2023, 6:39 AM
Unknown Object (File)
Dec 20 2023, 2:46 AM
Unknown Object (File)
Aug 13 2023, 4:18 AM
Unknown Object (File)
May 17 2023, 9:04 PM
Unknown Object (File)
May 17 2023, 8:38 PM
Unknown Object (File)
Dec 29 2022, 2:06 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.