Skip to content

Commit 9f8f75d

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

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/i2c/i2c_ite_it8xxx2.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
(DT_NODELABEL(pinctrl_i2c_clk##idx), pinctrls))
2626
#define DEV_DATA_PINMUX(idx) DEVICE_DT_GET(DT_PHANDLE \
2727
(DT_NODELABEL(pinctrl_i2c_data##idx), pinctrls))
28-
#define DEV_CLK_PIN(idx) DT_PHA(DT_PHANDLE_BY_IDX \
29-
(DT_DRV_INST(idx), pinctrl_0, 0), pinctrls, pin)
30-
#define DEV_DATA_PIN(idx) DT_PHA(DT_PHANDLE_BY_IDX \
31-
(DT_DRV_INST(idx), pinctrl_1, 0), pinctrls, pin)
32-
#define DEV_CLK_ALT_FUNC(idx) DT_PHA(DT_PHANDLE_BY_IDX \
33-
(DT_DRV_INST(idx), pinctrl_0, 0), pinctrls, alt_func)
34-
#define DEV_DATA_ALT_FUNC(idx) DT_PHA(DT_PHANDLE_BY_IDX \
35-
(DT_DRV_INST(idx), pinctrl_1, 0), pinctrls, alt_func)
28+
#define DEV_CLK_PIN(idx) DT_PHA( \
29+
DT_INST_PINCTRL_BY_IDX(idx, 0, 0), pinctrls, pin)
30+
#define DEV_DATA_PIN(idx) DT_PHA( \
31+
DT_INST_PINCTRL_BY_IDX(idx, 1, 0), pinctrls, pin)
32+
#define DEV_CLK_ALT_FUNC(idx) DT_PHA( \
33+
DT_INST_PINCTRL_BY_IDX(idx, 0, 0), pinctrls, alt_func)
34+
#define DEV_DATA_ALT_FUNC(idx) DT_PHA( \
35+
DT_INST_PINCTRL_BY_IDX(idx, 1, 0), pinctrls, alt_func)
3636

3737
#define I2C_STANDARD_PORT_COUNT 3
3838
/* Default PLL frequency. */

0 commit comments

Comments
 (0)