Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits) Input: add driver for Synaptics I2C touchpad Input: synaptics - add support for reporting x/y resolution Input: ALPS - handle touchpoints buttons correctly Input: gpio-keys - change timer to workqueue Input: ads7846 - pin change interrupt support Input: add support for touchscreen on W90P910 ARM platform Input: appletouch - improve finger detection Input: wacom - clear Intuos4 wheel data when finger leaves proximity Input: ucb1400 - move static function from header into core Input: add driver for EETI touchpanels Input: ads7846 - more detailed model name in sysfs Input: ads7846 - support swapping x and y axes Input: ati_remote2 - use non-atomic bitops Input: introduce lm8323 keypad driver Input: psmouse - ESD workaround fix for OLPC XO touchpad Input: tsc2007 - make sure platform provides get_pendown_state() Input: uinput - flush all pending ff effects before destroying device Input: simplify name handling for certain input handles Input: serio - do not use deprecated dev.power.power_state Input: wacom - add support for Intuos4 tablets ...
This commit is contained in:
@@ -23,6 +23,26 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/ucb1400.h>
|
||||
|
||||
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;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ucb1400_adc_read);
|
||||
|
||||
static int ucb1400_core_probe(struct device *dev)
|
||||
{
|
||||
int err;
|
||||
|
Reference in New Issue
Block a user