aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 13:17:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 13:17:02 -0400
commit93db6294958f62643a917e44d1abc85440e600cf (patch)
tree33de2c41b0f70d209d64487d1a2bba6d673015ef /drivers/mfd
parent43813f399c72aa22e01a680559c1cb5274bf2140 (diff)
parenteef3e4cab72eaf5345e3c73b2975c194a714f6cd (diff)
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 ...
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ucb1400_core.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c
index 178159e264ce..78c2135c5de6 100644
--- a/drivers/mfd/ucb1400_core.c
+++ b/drivers/mfd/ucb1400_core.c
@@ -23,6 +23,26 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/ucb1400.h> 24#include <linux/ucb1400.h>
25 25
26unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
27 int adcsync)
28{
29 unsigned int val;
30
31 if (adcsync)
32 adc_channel |= UCB_ADC_SYNC_ENA;
33
34 ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel);
35 ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel |
36 UCB_ADC_START);
37
38 while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA))
39 & UCB_ADC_DAT_VALID))
40 schedule_timeout_uninterruptible(1);
41
42 return val & UCB_ADC_DAT_MASK;
43}
44EXPORT_SYMBOL_GPL(ucb1400_adc_read);
45
26static int ucb1400_core_probe(struct device *dev) 46static int ucb1400_core_probe(struct device *dev)
27{ 47{
28 int err; 48 int err;