mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[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 <[email protected]> CC: Ondrej Zary <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
9bc31633c2
commit
31a62d4157
2 changed files with 10 additions and 0 deletions
|
|
@ -71,6 +71,9 @@ static void snd_tea575x_write(struct snd_tea575x *tea, unsigned int val)
|
|||
u16 l;
|
||||
u8 data;
|
||||
|
||||
if (tea->ops->write_val)
|
||||
return tea->ops->write_val(tea, val);
|
||||
|
||||
tea->ops->set_direction(tea, 1);
|
||||
udelay(16);
|
||||
|
||||
|
|
@ -94,6 +97,9 @@ static u32 snd_tea575x_read(struct snd_tea575x *tea)
|
|||
u16 l, rdata;
|
||||
u32 data = 0;
|
||||
|
||||
if (tea->ops->read_val)
|
||||
return tea->ops->read_val(tea);
|
||||
|
||||
tea->ops->set_direction(tea, 0);
|
||||
tea->ops->set_pins(tea, 0);
|
||||
udelay(16);
|
||||
|
|
|
|||
Loading…
Reference in a new issue