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 3483
Build 3523: arc lint + arc unit

Event Timeline

manu updated this revision to Diff 15675.Apr 27 2016, 8:08 PM
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.
manu updated this revision to Diff 15676.Apr 27 2016, 8:12 PM

Fix a few style(9) issues.

andrew added inline comments.May 3 2016, 5:18 PM
sys/arm/allwinner/axp209.c
71

Why is this needed?

manu added inline comments.May 3 2016, 9:49 PM
sys/arm/allwinner/axp209.c
71

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

manu updated this revision to Diff 16637.May 20 2016, 6:26 PM
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

manu updated this revision to Diff 16647.May 20 2016, 11:23 PM

Rename xpower to xpowers.

manu updated this revision to Diff 16768.May 24 2016, 3:00 AM

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

manu added a comment.May 24 2016, 3:04 AM

Using this devd rule for testing :

notify 100 {

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

};

jmcneill accepted this revision.May 24 2016, 9:13 PM
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.