Page MenuHomeFreeBSD

Pass node to the gpio_pin_get_by_ofw_XXX functions
ClosedPublic

Authored by gonzo on May 9 2016, 8:35 PM.
Tags
None
Referenced Files
F124999836: D6277.diff
Sat, Aug 2, 5:49 AM
Unknown Object (File)
Mon, Jul 28, 2:44 PM
Unknown Object (File)
Mon, Jul 28, 11:07 AM
Unknown Object (File)
Sat, Jul 26, 12:46 PM
Unknown Object (File)
Mon, Jul 7, 9:54 PM
Unknown Object (File)
Jun 24 2025, 2:50 AM
Unknown Object (File)
Jun 22 2025, 5:11 AM
Unknown Object (File)
Jun 21 2025, 10:30 PM
Subscribers

Details

Summary

Current API assumes that "gpios" property belongs to the device's node but for some binding it's not true: gpiokeys has set of child nodes with this property.

Patch adds new argument instead of replacing device_t because device_t will be used to track ownership for allocated pins

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

gonzo retitled this revision from to Pass node to the gpio_pin_get_by_ofw_XXX functions.
gonzo updated this object.
gonzo edited the test plan for this revision. (Show Details)
gonzo added a reviewer: mmel.
gonzo set the repository for this revision to rS FreeBSD src repository - subversion.
mmel edited edge metadata.
mmel added inline comments.
sys/dev/gpio/ofw_gpiobus.c
67 ↗(On Diff #16082)

KASSERT(consumer != NULL && cnode > 0, ...) ?

126 ↗(On Diff #16082)

Same as above - KASSERT(consumer != NULL && cnode > 0, ...) ?

This revision is now accepted and ready to land.May 10 2016, 4:26 AM
This revision was automatically updated to reflect the committed changes.