Page MenuHomeFreeBSD

AXP209 Interrupt, Sensors and GPIO support
ClosedPublic

Authored by manu on Apr 27 2016, 8:08 PM.

Details

Summary

This adds interrupts, sensors and gpio support for AXP209
Sensors are exposed via sysctl.
Interrupt are mostly used to print message on console right now.
PEK (Power Enable Key) interrupts is enable on short and long press, pressing the button will poweroff the board.
This also add a tunable hw.axp209.bootverbose.

Test Plan

Apply patch and test on board with AXP209 (A10/A20 board)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 3862
Build 3905: arc lint + arc unit

Event Timeline

manu retitled this revision from to AXP209 Interrupt and Sensors support.
manu updated this object.
manu edited the test plan for this revision. (Show Details)
manu added a reviewer: ARM.
manu set the repository for this revision to rS FreeBSD src repository.
manu added a project: ARM.

Fix a few style(9) issues.

sys/arm/allwinner/axp209.c
87

Why is this needed?

sys/arm/allwinner/axp209.c
87

Just to print some event in the interrupt handler when not booting with -v

manu retitled this revision from AXP209 Interrupt and Sensors support to AXP209 Interrupt, Sensors and GPIO support.
manu updated this object.

Add GPIO support.
Add dtsi for axp209 that defines it as a gpio-controller.
Make twsi and axp209 early driver to other driver can probe pin at boot

Rename xpower to xpowers.

Use devctl_notify to report PMU activity instead of more or less useless device_printf.
Use BUS_PASS_RESOURCE as it's more appropriate.

Using this devd rule for testing :

notify 100 {

match "system" "PMU";
match "subsystem" Battery";
action "logger $subsystem $type";

};

jmcneill added a reviewer: jmcneill.
jmcneill added a subscriber: jmcneill.
jmcneill added inline comments.
sys/arm/allwinner/axp209.c
654

X-Powers

This revision is now accepted and ready to land.May 24 2016, 9:13 PM
This revision was automatically updated to reflect the committed changes.