Lines Matching +full:1 +full:_chan

39 	#define MESON_SAR_ADC_REG0_CONTINUOUS_EN		BIT(1)
44 #define MESON_SAR_ADC_CHAN_LIST_ENTRY_MASK(_chan) \ argument
45 (GENMASK(2, 0) << ((_chan) * 3))
48 #define MESON_SAR_ADC_AVG_CNTL_AVG_MODE_SHIFT(_chan) \ argument
49 (16 + ((_chan) * 2))
50 #define MESON_SAR_ADC_AVG_CNTL_AVG_MODE_MASK(_chan) \ argument
51 (GENMASK(17, 16) << ((_chan) * 2))
52 #define MESON_SAR_ADC_AVG_CNTL_NUM_SAMPLES_SHIFT(_chan) \ argument
53 (0 + ((_chan) * 2))
54 #define MESON_SAR_ADC_AVG_CNTL_NUM_SAMPLES_MASK(_chan) \ argument
55 (GENMASK(1, 0) << ((_chan) * 2))
90 #define MESON_SAR_ADC_AUX_SW_MUX_SEL_CHAN_SHIFT(_chan) \ argument
91 (8 + (((_chan) - 2) * 3))
97 #define MESON_SAR_ADC_AUX_SW_YM_DRIVE_SW BIT(1)
115 #define MESON_SAR_ADC_CHAN_10_SW_CHAN0_YM_DRIVE_SW BIT(1)
134 #define MESON_SAR_ADC_DETECT_IDLE_SW_IDLE_YM_DRIVE_SW BIT(1)
203 udelay(1); in meson_saradc_lock()
241 return clamp(tmp, 0, (1 << priv->data->num_bits) - 1); in meson_saradc_calib_val()
254 udelay(1); in meson_saradc_wait_busy_clear()
275 if (count != 1) { in meson_saradc_read_raw_sample()
289 fifo_val &= GENMASK(priv->data->num_bits - 1, 0); in meson_saradc_read_raw_sample()
364 * channel, which starts counting at index 0 (which means: count = 1). in meson_saradc_enable_channel()
463 nominal0 = (1 << priv->data->num_bits) / 4; in meson_saradc_calib()
464 nominal1 = (1 << priv->data->num_bits) * 3 / 4; in meson_saradc_calib()
532 /* delay between two samples = (10+1) * 1uS */ in meson_saradc_init()
542 /* delay between two samples = (10+1) * 1uS */ in meson_saradc_init()
550 1)); in meson_saradc_init()
554 * (0 = SAR_ADC_CH0, 1 = SAR_ADC_CH1) in meson_saradc_init()
560 regval = FIELD_PREP(MESON_SAR_ADC_CHAN_10_SW_CHAN1_MUX_SEL_MASK, 1); in meson_saradc_init()
588 regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1); in meson_saradc_init()
647 priv->active_channel = -1; in meson_saradc_stop()
671 priv->active_channel = -1; in meson_saradc_probe()
683 uc_pdata->data_mask = GENMASK(priv->data->num_bits - 1, 0); in meson_saradc_ofdata_to_platdata()
686 uc_pdata->channel_mask = GENMASK(NUM_CHANNELS - 1, 0); in meson_saradc_ofdata_to_platdata()