diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
| commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
| tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /include/linux/ucb1400.h | |
| parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
| parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) | |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
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 970473bf8d5a..ed889f4168f3 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) | |||
| 134 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); | 134 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | ||
| 138 | int adcsync) | ||
| 139 | { | ||
| 140 | unsigned int val; | ||
| 141 | |||
| 142 | if (adcsync) | ||
| 143 | adc_channel |= UCB_ADC_SYNC_ENA; | ||
| 144 | |||
| 145 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel); | ||
| 146 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel | | ||
| 147 | UCB_ADC_START); | ||
| 148 | |||
| 149 | while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA)) | ||
| 150 | & UCB_ADC_DAT_VALID)) | ||
| 151 | schedule_timeout_uninterruptible(1); | ||
| 152 | |||
| 153 | return val & UCB_ADC_DAT_MASK; | ||
| 154 | } | ||
| 155 | |||
| 156 | static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) | 137 | static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) |
| 157 | { | 138 | { |
| 158 | ucb1400_reg_write(ac97, UCB_ADC_CR, 0); | 139 | ucb1400_reg_write(ac97, UCB_ADC_CR, 0); |
| 159 | } | 140 | } |
| 160 | 141 | ||
| 142 | |||
| 143 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | ||
| 144 | int adcsync); | ||
| 145 | |||
| 161 | #endif | 146 | #endif |
