diff options
author | James Morris <jmorris@namei.org> | 2009-06-30 09:10:35 +1000 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-06-30 09:10:35 +1000 |
commit | ac7242142b03421c96b0a2f8d99f146d075614c2 (patch) | |
tree | b0b2ead65858c7a343d38affed86fe815e37e7e9 /include/linux/ucb1400.h | |
parent | 89c86576ecde504da1eeb4f4882b2189ac2f9c4a (diff) | |
parent | 2bfdd79eaa0043346e773ba5f6cfd811ea31b73d (diff) | |
download | op-kernel-dev-ac7242142b03421c96b0a2f8d99f146d075614c2.zip op-kernel-dev-ac7242142b03421c96b0a2f8d99f146d075614c2.tar.gz |
Merge branch 'master' into next
Diffstat (limited to 'include/linux/ucb1400.h')
-rw-r--r-- | include/linux/ucb1400.h | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index 970473b..ed889f4 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h @@ -134,28 +134,13 @@ static inline void ucb1400_adc_enable(struct snd_ac97 *ac97) ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); } -static unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, - int adcsync) -{ - unsigned int val; - - if (adcsync) - adc_channel |= UCB_ADC_SYNC_ENA; - - ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel); - ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel | - UCB_ADC_START); - - while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA)) - & UCB_ADC_DAT_VALID)) - schedule_timeout_uninterruptible(1); - - return val & UCB_ADC_DAT_MASK; -} - static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) { ucb1400_reg_write(ac97, UCB_ADC_CR, 0); } + +unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, + int adcsync); + #endif |