zephyr/include/devicetree
Martí Bolívar f4115423fa devicetree: add devicetree/pinctrl.h
This contains accessor macros for getting phandles out of pinctrl
properties by name and index. As usual, the representation in C for a
phandle is a node identifier.

Add these new macros:

- DT_PINCTRL_BY_IDX(node_id, pc_idx, idx): phandle at index idx
  in the pinctrl-<pc_idx> property

- DT_PINCTRL_0(node_id, idx): pinctrl-0 convenience for the same

- DT_PINCTRL_BY_NAME(node_id, name, idx): phandle at index idx
  in the pinctrl property named 'name'

- DT_PINCTRL_NAME_TO_IDX(node_id, name): convert a pinctrl property
  name to its index number

- DT_NUM_PINCTRLS_BY_IDX(node_id, pc_idx): number of phandles in
  pinctrl-<pc_idx>

- DT_NUM_PINCTRLS_BY_NAME(node_id, name): number of phandles in a
  named pinctrl property

- DT_NUM_PINCTRL_STATES(node_id): total number of pinctrl-<pc_idx>
  properties

- DT_PINCTRL_HAS_IDX(node_id, pc_idx): does pinctrl-<pc_idx> exist?

- DT_PINCTRL_HAS_NAME(node_id, name): does a named pinctrl property
  exist?

- DT_PINCTRL_IDX_TO_NAME_TOKEN(node_id, pc_idx): convert a pinctrl
  index to its name as a token, similar to DT_STRING_TOKEN()

- DT_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(node_id, pc_idx): like
  DT_PINCTRL_IDX_TO_NAME_TOKEN, but with an uppercase result

As well as DT_DRV_INST equivalents, which take inst wherever node_id
appears above:

- DT_INST_PINCTRL_BY_IDX()
- DT_INST_PINCTRL_0()
- DT_INST_PINCTRL_BY_NAME()
- DT_INST_PINCTRL_NAME_TO_IDX()
- DT_INST_NUM_PINCTRLS_BY_IDX()
- DT_INST_NUM_PINCTRLS_BY_NAME()
- DT_INST_NUM_PINCTRL_STATES()
- DT_INST_PINCTRL_HAS_IDX()
- DT_INST_PINCTRL_HAS_NAME()
- DT_INST_PINCTRL_IDX_TO_NAME_TOKEN()
- DT_INST_PINCTRL_IDX_TO_NAME_UPPER_TOKEN()

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-25 18:09:00 -04:00
..
clocks.h
dma.h
fixed-partitions.h
gpio.h
io-channels.h
memory.h reserved-memory: Introduce support for reserved-memory node 2021-07-15 18:12:51 -05:00
ordinals.h
pinctrl.h devicetree: add devicetree/pinctrl.h 2021-08-25 18:09:00 -04:00
pwms.h
spi.h
zephyr.h