aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt5645.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 69528ae5410c..be4d741c45ba 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -18,6 +18,7 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/spi/spi.h> 19#include <linux/spi/spi.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/acpi.h>
21#include <sound/core.h> 22#include <sound/core.h>
22#include <sound/pcm.h> 23#include <sound/pcm.h>
23#include <sound/pcm_params.h> 24#include <sound/pcm_params.h>
@@ -2656,6 +2657,15 @@ static const struct i2c_device_id rt5645_i2c_id[] = {
2656}; 2657};
2657MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id); 2658MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id);
2658 2659
2660#ifdef CONFIG_ACPI
2661static struct acpi_device_id rt5645_acpi_match[] = {
2662 { "10EC5645", 0 },
2663 { "10EC5650", 0 },
2664 {},
2665};
2666MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
2667#endif
2668
2659static int rt5645_i2c_probe(struct i2c_client *i2c, 2669static int rt5645_i2c_probe(struct i2c_client *i2c,
2660 const struct i2c_device_id *id) 2670 const struct i2c_device_id *id)
2661{ 2671{
@@ -2770,7 +2780,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
2770 2780
2771 case RT5645_DMIC_DATA_GPIO12: 2781 case RT5645_DMIC_DATA_GPIO12:
2772 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, 2782 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1,
2773 RT5645_DMIC_1_DP_MASK, RT5645_DMIC_2_DP_GPIO12); 2783 RT5645_DMIC_2_DP_MASK, RT5645_DMIC_2_DP_GPIO12);
2774 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, 2784 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1,
2775 RT5645_GP12_PIN_MASK, 2785 RT5645_GP12_PIN_MASK,
2776 RT5645_GP12_PIN_DMIC2_SDA); 2786 RT5645_GP12_PIN_DMIC2_SDA);
@@ -2872,6 +2882,7 @@ static struct i2c_driver rt5645_i2c_driver = {
2872 .driver = { 2882 .driver = {
2873 .name = "rt5645", 2883 .name = "rt5645",
2874 .owner = THIS_MODULE, 2884 .owner = THIS_MODULE,
2885 .acpi_match_table = ACPI_PTR(rt5645_acpi_match),
2875 }, 2886 },
2876 .probe = rt5645_i2c_probe, 2887 .probe = rt5645_i2c_probe,
2877 .remove = rt5645_i2c_remove, 2888 .remove = rt5645_i2c_remove,