Page MenuHomeFreeBSD

AXP209 Interrupt, Sensors and GPIO support

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



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

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

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.

71 ↗(On Diff #15676)

Why is this needed?

71 ↗(On Diff #15676)

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.
648 ↗(On Diff #16768)


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.