Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320551
b: refs/heads/master
c: 31a62d4
h: refs/heads/master
i:
  320549: 7f8edea
  320547: 4884088
  320543: 5668c95
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jul 30, 2012
1 parent 57899ac commit 32a9bb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bc31633c20ca6a49071f2162c232ae556151cc2
refs/heads/master: 31a62d415726d94bae5caf5f2e50232aa06babf6
4 changes: 4 additions & 0 deletions trunk/include/sound/tea575x-tuner.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
struct snd_tea575x;

struct snd_tea575x_ops {
/* Drivers using snd_tea575x must either define read_ and write_val */
void (*write_val)(struct snd_tea575x *tea, u32 val);
u32 (*read_val)(struct snd_tea575x *tea);
/* Or define the 3 pin functions */
void (*set_pins)(struct snd_tea575x *tea, u8 pins);
u8 (*get_pins)(struct snd_tea575x *tea);
void (*set_direction)(struct snd_tea575x *tea, bool output);
Expand Down
6 changes: 6 additions & 0 deletions trunk/sound/i2c/other/tea575x-tuner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down

0 comments on commit 32a9bb8

Please sign in to comment.