aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-05-18 08:36:17 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-30 16:56:26 -0400
commit31a62d415726d94bae5caf5f2e50232aa06babf6 (patch)
tree124ec997e8674c1d6ee19d1e3e4714e8da4df1ac /sound
parent9bc31633c20ca6a49071f2162c232ae556151cc2 (diff)
[media] snd_tea575x: Add write_/read_val operations
Some devices which use the tea575x tuner chip don't allow bit banging the lines, instead they offer a method to directly set / get the contents of the 25 bit shift-register in the chip. Notably the Griffin radioSHARK USB radio receiver does this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/i2c/other/tea575x-tuner.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index b29b88f93c9e..080aae9d1198 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -71,6 +71,9 @@ static void snd_tea575x_write(struct snd_tea575x *tea, unsigned int val)
71 u16 l; 71 u16 l;
72 u8 data; 72 u8 data;
73 73
74 if (tea->ops->write_val)
75 return tea->ops->write_val(tea, val);
76
74 tea->ops->set_direction(tea, 1); 77 tea->ops->set_direction(tea, 1);
75 udelay(16); 78 udelay(16);
76 79
@@ -94,6 +97,9 @@ static u32 snd_tea575x_read(struct snd_tea575x *tea)
94 u16 l, rdata; 97 u16 l, rdata;
95 u32 data = 0; 98 u32 data = 0;
96 99
100 if (tea->ops->read_val)
101 return tea->ops->read_val(tea);
102
97 tea->ops->set_direction(tea, 0); 103 tea->ops->set_direction(tea, 0);
98 tea->ops->set_pins(tea, 0); 104 tea->ops->set_pins(tea, 0);
99 udelay(16); 105 udelay(16);