Page MenuHomeFreeBSD

AXP209 Interrupt, Sensors and GPIO support
ClosedPublic

Authored by manu on Apr 27 2016, 8:08 PM.
Tags
Referenced Files
F81657074: D6135.id.diff
Fri, Apr 19, 1:44 PM
Unknown Object (File)
Thu, Apr 18, 6:22 AM
Unknown Object (File)
Thu, Apr 18, 5:14 AM
Unknown Object (File)
Wed, Apr 17, 2:57 AM
Unknown Object (File)
Tue, Apr 16, 6:55 AM
Unknown Object (File)
Thu, Apr 11, 12:20 AM
Unknown Object (File)
Thu, Mar 28, 10:50 PM
Unknown Object (File)
Mon, Mar 25, 2:47 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 - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3483
Build 3523: 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 - subversion.
manu added a project: ARM.

Fix a few style(9) issues.

sys/arm/allwinner/axp209.c
71

Why is this needed?

sys/arm/allwinner/axp209.c
71

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
415

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.