Home
last modified time | relevance | path

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

/linux-4.1.27/drivers/iio/adc/
Dti_am335x_adc.c53 static u32 get_adc_step_mask(struct tiadc_device *adc_dev) in get_adc_step_mask() argument
57 step_en = ((1 << adc_dev->channels) - 1); in get_adc_step_mask()
58 step_en <<= TOTAL_STEPS - adc_dev->channels + 1; in get_adc_step_mask()
62 static u32 get_adc_chan_step_mask(struct tiadc_device *adc_dev, in get_adc_chan_step_mask() argument
67 for (i = 0; i < ARRAY_SIZE(adc_dev->channel_step); i++) { in get_adc_chan_step_mask()
68 if (chan->channel == adc_dev->channel_line[i]) { in get_adc_chan_step_mask()
71 step = adc_dev->channel_step[i]; in get_adc_chan_step_mask()
80 static u32 get_adc_step_bit(struct tiadc_device *adc_dev, int chan) in get_adc_step_bit() argument
82 return 1 << adc_dev->channel_step[chan]; in get_adc_step_bit()
87 struct tiadc_device *adc_dev = iio_priv(indio_dev); in tiadc_step_config() local
[all …]
Dcc10001_adc.c70 static inline void cc10001_adc_write_reg(struct cc10001_adc_device *adc_dev, in cc10001_adc_write_reg() argument
73 writel(val, adc_dev->reg_base + reg); in cc10001_adc_write_reg()
76 static inline u32 cc10001_adc_read_reg(struct cc10001_adc_device *adc_dev, in cc10001_adc_read_reg() argument
79 return readl(adc_dev->reg_base + reg); in cc10001_adc_read_reg()
82 static void cc10001_adc_power_up(struct cc10001_adc_device *adc_dev) in cc10001_adc_power_up() argument
84 cc10001_adc_write_reg(adc_dev, CC10001_ADC_POWER_DOWN, 0); in cc10001_adc_power_up()
85 ndelay(adc_dev->start_delay_ns); in cc10001_adc_power_up()
88 static void cc10001_adc_power_down(struct cc10001_adc_device *adc_dev) in cc10001_adc_power_down() argument
90 cc10001_adc_write_reg(adc_dev, CC10001_ADC_POWER_DOWN, in cc10001_adc_power_down()
94 static void cc10001_adc_start(struct cc10001_adc_device *adc_dev, in cc10001_adc_start() argument
[all …]
/linux-4.1.27/arch/arm/plat-samsung/
Dadc.c81 static struct adc_device *adc_dev; variable
152 struct adc_device *adc = adc_dev; in s3c_adc_start()
260 spin_lock_irqsave(&adc_dev->lock, flags); in s3c_adc_release()
263 if (adc_dev->cur == client) in s3c_adc_release()
264 adc_dev->cur = NULL; in s3c_adc_release()
265 if (adc_dev->ts_pend == client) in s3c_adc_release()
266 adc_dev->ts_pend = NULL; in s3c_adc_release()
278 if (adc_dev->cur == NULL) in s3c_adc_release()
279 s3c_adc_try(adc_dev); in s3c_adc_release()
281 spin_unlock_irqrestore(&adc_dev->lock, flags); in s3c_adc_release()
[all …]