aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2016-08-04 09:38:41 -0400
committerMark Brown <broonie@kernel.org>2016-08-08 06:55:20 -0400
commit0306741004fdfc2bc515b4b129b1f86881c5fcf5 (patch)
treeb87a6bbe52669766b548d86348388a93859a0ff3 /include/sound
parent9b08f30c4f91fb9bbafa6a844cd0302e5752b21e (diff)
ASoC: L3 bus: Add default gpio ops
This adds aptional GPIO bit-bang based callback implementations for setting CLK, DATA and MODE L3 bus lines. It is added here to avoid possible duplicate implementations across users of the bus. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/l3.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/sound/l3.h b/include/sound/l3.h
index 423a08f0f1b0..1471da22adad 100644
--- a/include/sound/l3.h
+++ b/include/sound/l3.h
@@ -2,9 +2,15 @@
2#define _L3_H_ 1 2#define _L3_H_ 1
3 3
4struct l3_pins { 4struct l3_pins {
5 void (*setdat)(int); 5 void (*setdat)(struct l3_pins *, int);
6 void (*setclk)(int); 6 void (*setclk)(struct l3_pins *, int);
7 void (*setmode)(int); 7 void (*setmode)(struct l3_pins *, int);
8
9 int gpio_data;
10 int gpio_clk;
11 int gpio_mode;
12 int use_gpios;
13
8 int data_hold; 14 int data_hold;
9 int data_setup; 15 int data_setup;
10 int clock_high; 16 int clock_high;
@@ -13,6 +19,9 @@ struct l3_pins {
13 int mode_setup; 19 int mode_setup;
14}; 20};
15 21
22struct device;
23
16int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len); 24int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len);
25int l3_set_gpio_ops(struct device *dev, struct l3_pins *adap);
17 26
18#endif 27#endif