Lines Matching refs:ch_idx

240 static u8 tsc2046_adc_get_cmd(struct tsc2046_adc_priv *priv, int ch_idx,  in tsc2046_adc_get_cmd()  argument
254 switch (ch_idx) { in tsc2046_adc_get_cmd()
264 return TI_TSC2046_START | FIELD_PREP(TI_TSC2046_ADDR, ch_idx) | pd; in tsc2046_adc_get_cmd()
272 static int tsc2046_adc_read_one(struct tsc2046_adc_priv *priv, int ch_idx, in tsc2046_adc_read_one() argument
275 struct tsc2046_adc_ch_cfg *ch = &priv->ch_cfg[ch_idx]; in tsc2046_adc_read_one()
307 cmd = tsc2046_adc_get_cmd(priv, ch_idx, true); in tsc2046_adc_read_one()
313 tx_buf[i].cmd = tsc2046_adc_get_cmd(priv, ch_idx, false); in tsc2046_adc_read_one()
352 unsigned int ch_idx) in tsc2046_adc_group_set_layout() argument
354 struct tsc2046_adc_ch_cfg *ch = &priv->ch_cfg[ch_idx]; in tsc2046_adc_group_set_layout()
374 unsigned int group, int ch_idx) in tsc2046_adc_group_set_cmd() argument
384 cmd = tsc2046_adc_get_cmd(priv, ch_idx, true); in tsc2046_adc_group_set_cmd()
390 priv->tx[l->offset + i].cmd = tsc2046_adc_get_cmd(priv, ch_idx, false); in tsc2046_adc_group_set_cmd()
489 unsigned int ch_idx, group = 0; in tsc2046_adc_update_scan_mode() local
495 for_each_set_bit(ch_idx, active_scan_mask, ARRAY_SIZE(priv->l)) { in tsc2046_adc_update_scan_mode()
496 size += tsc2046_adc_group_set_layout(priv, group, ch_idx); in tsc2046_adc_update_scan_mode()
497 tsc2046_adc_group_set_cmd(priv, group, ch_idx); in tsc2046_adc_update_scan_mode()
654 unsigned int ch_idx; in tsc2046_adc_setup_spi_msg() local
685 for (ch_idx = 0; ch_idx < ARRAY_SIZE(priv->l); ch_idx++) in tsc2046_adc_setup_spi_msg()
686 size += tsc2046_adc_group_set_layout(priv, ch_idx, ch_idx); in tsc2046_adc_setup_spi_msg()