pwm: it8xxx2: 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
7ab602a843
commit
831332068b
2 changed files with 5 additions and 6 deletions
|
@ -1019,8 +1019,9 @@ static const struct i2c_driver_api i2c_it8xxx2_driver_api = {
|
||||||
|
|
||||||
#define I2C_ITE_IT8XXX2_INIT(idx) \
|
#define I2C_ITE_IT8XXX2_INIT(idx) \
|
||||||
static void i2c_it8xxx2_config_func_##idx(void); \
|
static void i2c_it8xxx2_config_func_##idx(void); \
|
||||||
static const struct i2c_alts_cfg i2c_alts_##idx[DT_INST_PROP_LEN \
|
static const struct i2c_alts_cfg \
|
||||||
(idx, pinctrl_0)] = IT8XXX2_DT_ALT_ITEMS_LIST(idx); \
|
i2c_alts_##idx[DT_INST_NUM_PINCTRLS_BY_IDX(idx, 0)] = \
|
||||||
|
IT8XXX2_DT_ALT_ITEMS_LIST(idx); \
|
||||||
\
|
\
|
||||||
static const struct i2c_it8xxx2_config i2c_it8xxx2_cfg_##idx = { \
|
static const struct i2c_it8xxx2_config i2c_it8xxx2_cfg_##idx = { \
|
||||||
.base = (uint8_t *)(DT_INST_REG_ADDR(idx)), \
|
.base = (uint8_t *)(DT_INST_REG_ADDR(idx)), \
|
||||||
|
|
|
@ -51,10 +51,8 @@ struct pwm_it8xxx2_cfg {
|
||||||
#define DRV_REG(dev) (struct pwm_it8xxx2_regs *)(DRV_CONFIG(dev)->base)
|
#define DRV_REG(dev) (struct pwm_it8xxx2_regs *)(DRV_CONFIG(dev)->base)
|
||||||
#define DEV_PINMUX(inst) \
|
#define DEV_PINMUX(inst) \
|
||||||
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(DT_NODELABEL(pinctrl_pwm##inst), pinctrls, 0))
|
DEVICE_DT_GET(DT_PHANDLE_BY_IDX(DT_NODELABEL(pinctrl_pwm##inst), pinctrls, 0))
|
||||||
#define DEV_PIN(inst) \
|
#define DEV_PIN(inst) DT_PHA(DT_INST_PINCTRL_0(inst, 0), pinctrls, pin)
|
||||||
DT_PHA(DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), pinctrl_0, 0), pinctrls, pin)
|
#define DEV_ALT_FUN(inst) DT_PHA(DT_INST_PINCTRL_0(inst, 0), pinctrls, alt_func)
|
||||||
#define DEV_ALT_FUN(inst) \
|
|
||||||
DT_PHA(DT_PHANDLE_BY_IDX(DT_DRV_INST(inst), pinctrl_0, 0), pinctrls, alt_func)
|
|
||||||
|
|
||||||
static void pwm_enable(const struct device *dev, int enabled)
|
static void pwm_enable(const struct device *dev, int enabled)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue