Lines Matching refs:channel_id
73 static uint8_t ps2_npcx_ctrl_get_ch_clk_mask(uint8_t channel_id) in ps2_npcx_ctrl_get_ch_clk_mask() argument
75 return BIT(NPCX_PSOSIG_CLK(channel_id)); in ps2_npcx_ctrl_get_ch_clk_mask()
78 int ps2_npcx_ctrl_configure(const struct device *dev, uint8_t channel_id, in ps2_npcx_ctrl_configure() argument
83 if (channel_id >= NPCX_PS2_CH_COUNT) { in ps2_npcx_ctrl_configure()
84 LOG_ERR("unexpected channel ID: %d", channel_id); in ps2_npcx_ctrl_configure()
93 data->callback_isr[channel_id] = callback_isr; in ps2_npcx_ctrl_configure()
99 int ps2_npcx_ctrl_enable_interface(const struct device *dev, uint8_t channel_id, in ps2_npcx_ctrl_enable_interface() argument
113 if (channel_id >= NPCX_PS2_CH_COUNT) { in ps2_npcx_ctrl_enable_interface()
114 LOG_ERR("unexpected channel ID: %d", channel_id); in ps2_npcx_ctrl_enable_interface()
120 ch_clk_mask = ps2_npcx_ctrl_get_ch_clk_mask(channel_id); in ps2_npcx_ctrl_enable_interface()
154 int ps2_npcx_ctrl_write(const struct device *dev, uint8_t channel_id, in ps2_npcx_ctrl_write() argument
161 if (channel_id >= NPCX_PS2_CH_COUNT) { in ps2_npcx_ctrl_write()
162 LOG_ERR("unexpected channel ID: %d", channel_id); in ps2_npcx_ctrl_write()
166 if (!(ps2_npcx_ctrl_get_ch_clk_mask(channel_id) & in ps2_npcx_ctrl_write()
168 LOG_ERR("channel %d is not enabled", channel_id); in ps2_npcx_ctrl_write()
197 inst->PSOSIG &= ~BIT(NPCX_PSOSIG_WDAT(channel_id)); in ps2_npcx_ctrl_write()
198 inst->PSOSIG |= ps2_npcx_ctrl_get_ch_clk_mask(channel_id); in ps2_npcx_ctrl_write()