Searched refs:adc_dev (Results 1 – 3 of 3) sorted by relevance
| /linux/drivers/iio/adc/ |
| H A D | ti_am335x_adc.c | 65 static u32 get_adc_step_mask(struct tiadc_device *adc_dev) in get_adc_step_mask() argument 69 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() argument 79 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() argument 94 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 …]
|
| H A D | cc10001_adc.c | 66 static inline void cc10001_adc_write_reg(struct cc10001_adc_device *adc_dev, in cc10001_adc_write_reg() argument 69 writel(val, adc_dev->reg_base + reg); in cc10001_adc_write_reg() 72 static inline u32 cc10001_adc_read_reg(struct cc10001_adc_device *adc_dev, in cc10001_adc_read_reg() argument 75 return readl(adc_dev->reg_base + reg); in cc10001_adc_read_reg() 78 static void cc10001_adc_power_up(struct cc10001_adc_device *adc_dev) in cc10001_adc_power_up() argument 80 cc10001_adc_write_reg(adc_dev, CC10001_ADC_POWER_DOWN, 0); in cc10001_adc_power_up() 81 ndelay(adc_dev->start_delay_ns); in cc10001_adc_power_up() 84 static void cc10001_adc_power_down(struct cc10001_adc_device *adc_dev) in cc10001_adc_power_down() argument 86 cc10001_adc_write_reg(adc_dev, CC10001_ADC_POWER_DOWN, in cc10001_adc_power_down() 90 static void cc10001_adc_start(struct cc10001_adc_device *adc_dev, in cc10001_adc_start() argument [all …]
|
| H A D | mt6359-auxadc.c | 167 int (*read_imp)(struct mt6359_auxadc *adc_dev, 453 static void mt6358_stop_imp_conv(struct mt6359_auxadc *adc_dev) in mt6358_stop_imp_conv() argument 455 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_stop_imp_conv() 456 struct regmap *regmap = adc_dev->regmap; in mt6358_stop_imp_conv() 464 static int mt6358_start_imp_conv(struct mt6359_auxadc *adc_dev, const struct iio_chan_spec *chan) in mt6358_start_imp_conv() argument 466 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_start_imp_conv() 468 struct regmap *regmap = adc_dev->regmap; in mt6358_start_imp_conv() 479 mt6358_stop_imp_conv(adc_dev); in mt6358_start_imp_conv() 486 static int mt6358_read_imp(struct mt6359_auxadc *adc_dev, in mt6358_read_imp() argument 489 const struct mtk_pmic_auxadc_info *cinfo = adc_dev->chip_info; in mt6358_read_imp() [all …]
|