Skip to content

Commit 357609a

Browse files
pwm: it8xxx2: use new DT pinctrl accessors
Update to use the new APIs. Signed-off-by: Martí Bolívar <[email protected]>
1 parent c3f694f commit 357609a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/pwm/pwm_ite_it8xxx2.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ struct pwm_it8xxx2_cfg {
5151
#define DRV_REG(dev) (struct pwm_it8xxx2_regs *)(DRV_CONFIG(dev)->base)
5252
#define DEV_PINMUX(inst) \
5353
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(DT_NODELABEL(pinctrl_pwm##inst), pinctrls, 0))
54-
#define DEV_PIN(inst) \
55-
DT_PHA(DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), pinctrl_0, 0), pinctrls, pin)
56-
#define DEV_ALT_FUN(inst) \
57-
DT_PHA(DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), pinctrl_0, 0), pinctrls, alt_func)
54+
#define DEV_PIN(inst) DT_PHA(DT_INST_PINCTRL_0(inst, 0), pinctrls, pin)
55+
#define DEV_ALT_FUN(inst) DT_PHA(DT_INST_PINCTRL_0(inst, 0), pinctrls, alt_func)
5856

5957
static void pwm_enable(const struct device *dev, int enabled)
6058
{

0 commit comments

Comments
 (0)