From 0306741004fdfc2bc515b4b129b1f86881c5fcf5 Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 4 Aug 2016 15:38:41 +0200 Subject: 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 Signed-off-by: Mark Brown --- include/sound/l3.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'include/sound') 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 @@ #define _L3_H_ 1 struct l3_pins { - void (*setdat)(int); - void (*setclk)(int); - void (*setmode)(int); + void (*setdat)(struct l3_pins *, int); + void (*setclk)(struct l3_pins *, int); + void (*setmode)(struct l3_pins *, int); + + int gpio_data; + int gpio_clk; + int gpio_mode; + int use_gpios; + int data_hold; int data_setup; int clock_high; @@ -13,6 +19,9 @@ struct l3_pins { int mode_setup; }; +struct device; + int l3_write(struct l3_pins *adap, u8 addr, u8 *data, int len); +int l3_set_gpio_ops(struct device *dev, struct l3_pins *adap); #endif -- cgit v1.2.3 From 84c5c20395a8e4ca2043136e1f0d128cf758244b Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Thu, 4 Aug 2016 15:38:44 +0200 Subject: ASoC: s3c24xx_uda134x: Remove unused power() callback The power() callback has always been empty so just remove it. Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown --- include/sound/s3c24xx_uda134x.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/s3c24xx_uda134x.h b/include/sound/s3c24xx_uda134x.h index 33df4cb909d3..ffaf1f098c8e 100644 --- a/include/sound/s3c24xx_uda134x.h +++ b/include/sound/s3c24xx_uda134x.h @@ -7,7 +7,6 @@ struct s3c24xx_uda134x_platform_data { int l3_clk; int l3_mode; int l3_data; - void (*power) (int); int model; }; -- cgit v1.2.3 From 2b26dd4c1fc5f83bc088f4a053120ca03817045e Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Mon, 19 Sep 2016 19:26:08 +0800 Subject: ASoC: rt5660: add rt5660 codec driver This is the initial codec driver for rt5660 Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- include/sound/rt5660.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/sound/rt5660.h (limited to 'include/sound') diff --git a/include/sound/rt5660.h b/include/sound/rt5660.h new file mode 100644 index 000000000000..065f83a24db6 --- /dev/null +++ b/include/sound/rt5660.h @@ -0,0 +1,31 @@ +/* + * linux/sound/rt5660.h -- Platform data for RT5660 + * + * Copyright 2016 Realtek Semiconductor Corp. + * Author: Oder Chiou + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __LINUX_SND_RT5660_H +#define __LINUX_SND_RT5660_H + +enum rt5660_dmic1_data_pin { + RT5660_DMIC1_NULL, + RT5660_DMIC1_DATA_GPIO2, + RT5660_DMIC1_DATA_IN1P, +}; + +struct rt5660_platform_data { + /* IN1 & IN3 can optionally be differential */ + bool in1_diff; + bool in3_diff; + bool use_ldo2; + bool poweroff_codec_in_suspend; + + enum rt5660_dmic1_data_pin dmic1_data_pin; +}; + +#endif -- cgit v1.2.3