Page MenuHomeFreeBSD

AXP209 Interrupt, Sensors and GPIO support
ClosedPublic

Authored by manu on Apr 27 2016, 8:08 PM.
Tags
Referenced Files
Unknown Object (File)
Mon, Mar 25, 2:47 PM
Unknown Object (File)
Feb 13 2024, 1:44 AM
Unknown Object (File)
Feb 12 2024, 5:26 AM
Unknown Object (File)
Feb 12 2024, 5:26 AM
Unknown Object (File)
Feb 12 2024, 5:26 AM
Unknown Object (File)
Feb 12 2024, 5:26 AM
Unknown Object (File)
Feb 12 2024, 5:26 AM
Unknown Object (File)
Feb 12 2024, 5:25 AM

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 Not Applicable
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.

sys/arm/allwinner/axp209.c
71 ↗(On Diff #15676)

Why is this needed?

sys/arm/allwinner/axp209.c
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.
sys/arm/allwinner/axp209.c
648 ↗(On Diff #16768)

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.