Skip to content
Commit 884d6e69 authored by Martí Bolívar's avatar Martí Bolívar Committed by Kumar Gala
Browse files

devicetree: gpio: make flags default to 0



The vast majority of devicetree bindings for GPIO controllers are
expected to have "flags" cells in their respective GPIO specifiers,
but that's not required by the specification and we want to make sure
to support that.

However, so many drivers and applications initialize gpio_dt_flags_t
values that it's silly to require each and every one of them to check
for the flags value and fall back to the sensible default flags value
of 0 when it does not exist.

Make the API easier to use correctly by returning 0 in the devicetree
core API for accessing flags, whenever there are no flags defined.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent 922b469f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment