Searched refs:adc_dev (Results 1 – 3 of 3) sorted by relevance
65 static u32 get_adc_step_mask(struct tiadc_device *adc_dev) in get_adc_step_mask() argument69 step_en = ((1 << adc_dev->channels) - 1); in get_adc_step_mask()70 step_en <<= TOTAL_STEPS - adc_dev->channels + 1; in get_adc_step_mask()74 static u32 get_adc_chan_step_mask(struct tiadc_device *adc_dev, in get_adc_chan_step_mask() argument79 for (i = 0; i < ARRAY_SIZE(adc_dev->channel_step); i++) { in get_adc_chan_step_mask()80 if (chan->channel == adc_dev->channel_line[i]) { in get_adc_chan_step_mask()83 step = adc_dev->channel_step[i]; in get_adc_chan_step_mask()92 static u32 get_adc_step_bit(struct tiadc_device *adc_dev, int chan) in get_adc_step_bit() argument94 return 1 << adc_dev->channel_step[chan]; in get_adc_step_bit()97 static int tiadc_wait_idle(struct tiadc_device *adc_dev) in tiadc_wait_idle() argument[all …]
115 struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); in mt6577_auxadc_read() local117 reg_channel = adc_dev->reg_base + MT6577_AUXADC_DAT0 + in mt6577_auxadc_read()120 mutex_lock(&adc_dev->lock); in mt6577_auxadc_read()122 mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_CON1, in mt6577_auxadc_read()138 mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_CON1, in mt6577_auxadc_read()144 if (adc_dev->dev_comp->check_global_idle) { in mt6577_auxadc_read()146 ret = readl_poll_timeout(adc_dev->reg_base + MT6577_AUXADC_CON2, in mt6577_auxadc_read()172 mutex_unlock(&adc_dev->lock); in mt6577_auxadc_read()178 mutex_unlock(&adc_dev->lock); in mt6577_auxadc_read()189 struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); in mt6577_auxadc_read_raw() local[all …]
166 int (*read_imp)(struct mt6359_auxadc *adc_dev,452 static void mt6358_stop_imp_conv(struct mt6359_auxadc *adc_dev) in mt6358_stop_imp_conv() argument454 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_stop_imp_conv()455 struct regmap *regmap = adc_dev->regmap; in mt6358_stop_imp_conv()463 static int mt6358_start_imp_conv(struct mt6359_auxadc *adc_dev, const struct iio_chan_spec *chan) in mt6358_start_imp_conv() argument465 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_start_imp_conv()467 struct regmap *regmap = adc_dev->regmap; in mt6358_start_imp_conv()478 mt6358_stop_imp_conv(adc_dev); in mt6358_start_imp_conv()485 static int mt6358_read_imp(struct mt6359_auxadc *adc_dev, in mt6358_read_imp() argument488 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_read_imp()[all …]