HomeFreeBSD

Provide a public function to acquire a gpio pin by giving the property name

Description

Provide a public function to acquire a gpio pin by giving the property name
and index. A private function to do exactly that already existed, so this
renames gpio_pin_get_by_ofw_impl() to gpio_pin_get_by_ofw_propidx() and
provides a declaration for it in a public header.

Previously there were functions to get a pin by property name (assuming
there would only be one pin defined for the name), or by index (asuming
the property has the standard name "gpios"). It turns out there are
devicetree bindings that describe properties with names other than "gpios"
which can describe multiple pins. Hence the need to retrieve the Nth item
from a named property.

Details

Provenance
ianAuthored on
Parents
rS329536: Add the MODULE_DEPEND()s needed so that the kernel linker can resolve all
Branches
Unknown
Tags
Unknown