• Home
  • Raw
  • Download

Lines Matching refs:regval

183 	u32 regval;  in meson_saradc_get_fifo_count()  local
185 regmap_read(priv->regmap, MESON_SAR_ADC_REG0, &regval); in meson_saradc_get_fifo_count()
187 return FIELD_GET(MESON_SAR_ADC_REG0_FIFO_COUNT_MASK, regval); in meson_saradc_get_fifo_count()
246 uint regval, timeout = 10000; in meson_saradc_wait_busy_clear() local
255 regmap_read(priv->regmap, MESON_SAR_ADC_REG0, &regval); in meson_saradc_wait_busy_clear()
256 } while (FIELD_GET(MESON_SAR_ADC_REG0_BUSY_MASK, regval) && timeout--); in meson_saradc_wait_busy_clear()
267 uint regval, fifo_chan, fifo_val, count; in meson_saradc_read_raw_sample() local
280 regmap_read(priv->regmap, MESON_SAR_ADC_FIFO_RD, &regval); in meson_saradc_read_raw_sample()
281 fifo_chan = FIELD_GET(MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK, regval); in meson_saradc_read_raw_sample()
288 fifo_val = FIELD_GET(MESON_SAR_ADC_FIFO_RD_SAMPLE_VALUE_MASK, regval); in meson_saradc_read_raw_sample()
359 uint regval; in meson_saradc_enable_channel() local
366 regval = FIELD_PREP(MESON_SAR_ADC_CHAN_LIST_MAX_INDEX_MASK, 0); in meson_saradc_enable_channel()
368 MESON_SAR_ADC_CHAN_LIST_MAX_INDEX_MASK, regval); in meson_saradc_enable_channel()
371 regval = FIELD_PREP(MESON_SAR_ADC_CHAN_LIST_ENTRY_MASK(0), channel); in meson_saradc_enable_channel()
373 MESON_SAR_ADC_CHAN_LIST_ENTRY_MASK(0), regval); in meson_saradc_enable_channel()
375 regval = FIELD_PREP(MESON_SAR_ADC_DETECT_IDLE_SW_DETECT_MUX_MASK, in meson_saradc_enable_channel()
379 regval); in meson_saradc_enable_channel()
381 regval = FIELD_PREP(MESON_SAR_ADC_DETECT_IDLE_SW_IDLE_MUX_SEL_MASK, in meson_saradc_enable_channel()
385 regval); in meson_saradc_enable_channel()
448 u32 regval; in meson_saradc_set_chan7_mux() local
450 regval = FIELD_PREP(MESON_SAR_ADC_REG3_CTRL_CHAN7_MUX_SEL_MASK, sel); in meson_saradc_set_chan7_mux()
452 MESON_SAR_ADC_REG3_CTRL_CHAN7_MUX_SEL_MASK, regval); in meson_saradc_set_chan7_mux()
496 uint regval; in meson_saradc_init() local
512 regmap_read(priv->regmap, MESON_SAR_ADC_REG3, &regval); in meson_saradc_init()
513 if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED) in meson_saradc_init()
556 regval = FIELD_PREP(MESON_SAR_ADC_CHAN_10_SW_CHAN0_MUX_SEL_MASK, 0); in meson_saradc_init()
559 regval); in meson_saradc_init()
560 regval = FIELD_PREP(MESON_SAR_ADC_CHAN_10_SW_CHAN1_MUX_SEL_MASK, 1); in meson_saradc_init()
563 regval); in meson_saradc_init()
571 regval = 0; in meson_saradc_init()
573 regval |= i << MESON_SAR_ADC_AUX_SW_MUX_SEL_CHAN_SHIFT(i); in meson_saradc_init()
574 regval |= MESON_SAR_ADC_AUX_SW_YP_DRIVE_SW; in meson_saradc_init()
575 regval |= MESON_SAR_ADC_AUX_SW_XP_DRIVE_SW; in meson_saradc_init()
576 regmap_write(priv->regmap, MESON_SAR_ADC_AUX_SW, regval); in meson_saradc_init()
588 regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1); in meson_saradc_init()
590 MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval); in meson_saradc_init()