Home
last modified time | relevance | path

Searched refs:adc_dev (Results 1 – 4 of 4) sorted by relevance

/Linux-v5.10/drivers/iio/adc/
Dti_am335x_adc.c73 static u32 get_adc_step_mask(struct tiadc_device *adc_dev) in get_adc_step_mask() argument
77 step_en = ((1 << adc_dev->channels) - 1); in get_adc_step_mask()
78 step_en <<= TOTAL_STEPS - adc_dev->channels + 1; in get_adc_step_mask()
82 static u32 get_adc_chan_step_mask(struct tiadc_device *adc_dev, in get_adc_chan_step_mask() argument
87 for (i = 0; i < ARRAY_SIZE(adc_dev->channel_step); i++) { in get_adc_chan_step_mask()
88 if (chan->channel == adc_dev->channel_line[i]) { in get_adc_chan_step_mask()
91 step = adc_dev->channel_step[i]; in get_adc_chan_step_mask()
100 static u32 get_adc_step_bit(struct tiadc_device *adc_dev, int chan) in get_adc_step_bit() argument
102 return 1 << adc_dev->channel_step[chan]; in get_adc_step_bit()
107 struct tiadc_device *adc_dev = iio_priv(indio_dev); in tiadc_step_config() local
[all …]
Dcc10001_adc.c67 static inline void cc10001_adc_write_reg(struct cc10001_adc_device *adc_dev, in cc10001_adc_write_reg() argument
70 writel(val, adc_dev->reg_base + reg); in cc10001_adc_write_reg()
73 static inline u32 cc10001_adc_read_reg(struct cc10001_adc_device *adc_dev, in cc10001_adc_read_reg() argument
76 return readl(adc_dev->reg_base + reg); in cc10001_adc_read_reg()
79 static void cc10001_adc_power_up(struct cc10001_adc_device *adc_dev) in cc10001_adc_power_up() argument
81 cc10001_adc_write_reg(adc_dev, CC10001_ADC_POWER_DOWN, 0); in cc10001_adc_power_up()
82 ndelay(adc_dev->start_delay_ns); in cc10001_adc_power_up()
85 static void cc10001_adc_power_down(struct cc10001_adc_device *adc_dev) in cc10001_adc_power_down() argument
87 cc10001_adc_write_reg(adc_dev, CC10001_ADC_POWER_DOWN, in cc10001_adc_power_down()
91 static void cc10001_adc_start(struct cc10001_adc_device *adc_dev, in cc10001_adc_start() argument
[all …]
Dmt6577_auxadc.c107 struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); in mt6577_auxadc_read() local
109 reg_channel = adc_dev->reg_base + MT6577_AUXADC_DAT0 + in mt6577_auxadc_read()
112 mutex_lock(&adc_dev->lock); in mt6577_auxadc_read()
114 mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_CON1, in mt6577_auxadc_read()
130 mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_CON1, in mt6577_auxadc_read()
136 if (adc_dev->dev_comp->check_global_idle) { in mt6577_auxadc_read()
138 ret = readl_poll_timeout(adc_dev->reg_base + MT6577_AUXADC_CON2, in mt6577_auxadc_read()
164 mutex_unlock(&adc_dev->lock); in mt6577_auxadc_read()
170 mutex_unlock(&adc_dev->lock); in mt6577_auxadc_read()
181 struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); in mt6577_auxadc_read_raw() local
[all …]
/Linux-v5.10/arch/arm/mach-s3c/
Dadc.c77 static struct adc_device *adc_dev; variable
148 struct adc_device *adc = adc_dev; in s3c_adc_start()
254 spin_lock_irqsave(&adc_dev->lock, flags); in s3c_adc_release()
257 if (adc_dev->cur == client) in s3c_adc_release()
258 adc_dev->cur = NULL; in s3c_adc_release()
259 if (adc_dev->ts_pend == client) in s3c_adc_release()
260 adc_dev->ts_pend = NULL; in s3c_adc_release()
272 if (adc_dev->cur == NULL) in s3c_adc_release()
273 s3c_adc_try(adc_dev); in s3c_adc_release()
275 spin_unlock_irqrestore(&adc_dev->lock, flags); in s3c_adc_release()
[all …]