Searched refs:adc_dev (Results 1 – 3 of 3) sorted by relevance
/Linux-v6.6/drivers/iio/adc/ |
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 …]
|
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 …]
|
D | mt6577_auxadc.c | 116 struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); in mt6577_auxadc_read() local 118 reg_channel = adc_dev->reg_base + MT6577_AUXADC_DAT0 + in mt6577_auxadc_read() 121 mutex_lock(&adc_dev->lock); in mt6577_auxadc_read() 123 mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_CON1, in mt6577_auxadc_read() 139 mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_CON1, in mt6577_auxadc_read() 145 if (adc_dev->dev_comp->check_global_idle) { in mt6577_auxadc_read() 147 ret = readl_poll_timeout(adc_dev->reg_base + MT6577_AUXADC_CON2, in mt6577_auxadc_read() 173 mutex_unlock(&adc_dev->lock); in mt6577_auxadc_read() 179 mutex_unlock(&adc_dev->lock); in mt6577_auxadc_read() 190 struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); in mt6577_auxadc_read_raw() local [all …]
|