ASoC: rt5677: Introduce proper table for ACPI enumeration
I2C devices are enumerated by IDs, and not by instances. Make it clear by using proper module device table for ACPI case. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2ea659a9ef
commit
a36afb0ab6
@ -5030,7 +5030,6 @@ static const struct regmap_config rt5677_regmap = {
|
|||||||
static const struct i2c_device_id rt5677_i2c_id[] = {
|
static const struct i2c_device_id rt5677_i2c_id[] = {
|
||||||
{ "rt5677", RT5677 },
|
{ "rt5677", RT5677 },
|
||||||
{ "rt5676", RT5676 },
|
{ "rt5676", RT5676 },
|
||||||
{ "RT5677CE:00", RT5677 },
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, rt5677_i2c_id);
|
MODULE_DEVICE_TABLE(i2c, rt5677_i2c_id);
|
||||||
@ -5041,6 +5040,14 @@ static const struct of_device_id rt5677_of_match[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, rt5677_of_match);
|
MODULE_DEVICE_TABLE(of, rt5677_of_match);
|
||||||
|
|
||||||
|
#ifdef CONFIG_ACPI
|
||||||
|
static const struct acpi_device_id rt5677_acpi_match[] = {
|
||||||
|
{ "RT5677CE", RT5677 },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(acpi, rt5677_acpi_match);
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct acpi_gpio_params plug_det_gpio = { RT5677_GPIO_PLUG_DET, 0, false };
|
static const struct acpi_gpio_params plug_det_gpio = { RT5677_GPIO_PLUG_DET, 0, false };
|
||||||
static const struct acpi_gpio_params mic_present_gpio = { RT5677_GPIO_MIC_PRESENT_L, 0, false };
|
static const struct acpi_gpio_params mic_present_gpio = { RT5677_GPIO_MIC_PRESENT_L, 0, false };
|
||||||
static const struct acpi_gpio_params headphone_enable_gpio = { RT5677_GPIO_HP_AMP_SHDN_L, 0, false };
|
static const struct acpi_gpio_params headphone_enable_gpio = { RT5677_GPIO_HP_AMP_SHDN_L, 0, false };
|
||||||
@ -5301,6 +5308,7 @@ static struct i2c_driver rt5677_i2c_driver = {
|
|||||||
.driver = {
|
.driver = {
|
||||||
.name = "rt5677",
|
.name = "rt5677",
|
||||||
.of_match_table = rt5677_of_match,
|
.of_match_table = rt5677_of_match,
|
||||||
|
.acpi_match_table = ACPI_PTR(rt5677_acpi_match),
|
||||||
},
|
},
|
||||||
.probe = rt5677_i2c_probe,
|
.probe = rt5677_i2c_probe,
|
||||||
.remove = rt5677_i2c_remove,
|
.remove = rt5677_i2c_remove,
|
||||||
|
Loading…
Reference in New Issue
Block a user