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

soc: nrf: add DT GPIO helper macros



Add some helper macros that will be convenient to use from device
drivers for accessing and error checking pin mux information in the
devicetree:

- NRF_DT_GPIOS_TO_PSEL(): converts a devicetree GPIO phandle
  <&gpioX pin flags> to the "PSEL style" registers found in
  nRF SoC family IPs. The conversion is done at
  build time and relies on devicetree properties.

- NRF_DT_CHECK_GPIO_CTLR_IS_SOC(): make sure a GPIO controller
  in a phandle-array property is one of the SoC GPIO controllers
  by checking its compatible is nordic,nrf-gpio.

See comments in the patch for more details.

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