soc: riscv-ite: use new DT pinctrl accessors
Update to use the new APIs. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
d40037c56e
commit
02b45f522f
1 changed files with 10 additions and 10 deletions
|
@ -7,12 +7,12 @@
|
||||||
#ifndef _ITE_IT8XXX2_SOC_DT_H_
|
#ifndef _ITE_IT8XXX2_SOC_DT_H_
|
||||||
#define _ITE_IT8XXX2_SOC_DT_H_
|
#define _ITE_IT8XXX2_SOC_DT_H_
|
||||||
|
|
||||||
#define IT8XXX2_DEV_PINMUX(idx, inst) DEVICE_DT_GET(DT_PHANDLE(DT_PHANDLE_BY_IDX \
|
#define IT8XXX2_DEV_PINMUX(idx, inst) DEVICE_DT_GET(DT_PHANDLE( \
|
||||||
(DT_DRV_INST(inst), pinctrl_0, idx), pinctrls))
|
DT_INST_PINCTRL_0(inst, idx), pinctrls))
|
||||||
#define IT8XXX2_DEV_PIN(idx, inst) DT_PHA(DT_PHANDLE_BY_IDX \
|
#define IT8XXX2_DEV_PIN(idx, inst) DT_PHA( \
|
||||||
(DT_DRV_INST(inst), pinctrl_0, idx), pinctrls, pin)
|
DT_INST_PINCTRL_0(inst, idx), pinctrls, pin)
|
||||||
#define IT8XXX2_DEV_ALT_FUNC(idx, inst) DT_PHA(DT_PHANDLE_BY_IDX \
|
#define IT8XXX2_DEV_ALT_FUNC(idx, inst) DT_PHA( \
|
||||||
(DT_DRV_INST(inst), pinctrl_0, idx), pinctrls, alt_func)
|
DT_INST_PINCTRL_0(inst, idx), pinctrls, alt_func)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Macro function to construct it8xxx2 alt item in UTIL_LISTIFY extension.
|
* @brief Macro function to construct it8xxx2 alt item in UTIL_LISTIFY extension.
|
||||||
|
@ -35,10 +35,10 @@
|
||||||
* @param inst instance number for compatible defined in DT_DRV_COMPAT.
|
* @param inst instance number for compatible defined in DT_DRV_COMPAT.
|
||||||
* @return an array of it8xxx2 alt items.
|
* @return an array of it8xxx2 alt items.
|
||||||
*/
|
*/
|
||||||
#define IT8XXX2_DT_ALT_ITEMS_LIST(inst) { \
|
#define IT8XXX2_DT_ALT_ITEMS_LIST(inst) { \
|
||||||
UTIL_LISTIFY(DT_INST_PROP_LEN(inst, pinctrl_0), \
|
UTIL_LISTIFY(DT_INST_NUM_PINCTRLS_BY_IDX(inst, 0), \
|
||||||
IT8XXX2_DT_ALT_ITEMS_FUNC, \
|
IT8XXX2_DT_ALT_ITEMS_FUNC, \
|
||||||
inst) \
|
inst) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _ITE_IT8XXX2_SOC_DT_H_ */
|
#endif /* _ITE_IT8XXX2_SOC_DT_H_ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue