@@ -25,16 +25,26 @@
static int arizona_spi_probe(struct spi_device *spi)
{
- const struct spi_device_id *id = spi_get_device_id(spi);
+ const struct spi_device_id *id ;
struct arizona *arizona;
const struct regmap_config *regmap_config;
unsigned long type;
int ret;
- if (spi->dev.of_node)
- type = arizona_of_get_type(&spi->dev);
- else
+ /*
+ id = spi_get_device_id(spi);
+
+ if (!id)
+ return -EINVAL;
+ type = id->driver_data;
+ */
+ id = WM5102;
+
+ if (id->driver_data)
type = id->driver_data;
+ else
+ type = WM5102;
+
switch (type) {
#ifdef CONFIG_MFD_WM5102
@@ -90,11 +100,23 @@ static const struct spi_device_id arizona_spi_ids[] = {
};
MODULE_DEVICE_TABLE(spi, arizona_spi_ids);
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id wm5102_acpi_match[] = {
+ { "WM510205", WM5102 },
+ {},
+};
+
+MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match);
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id wm5102_acpi_match[] = {
+ { "WM510205", WM5102 },
+ {},
+};
+
+MODULE_DEVICE_TABLE(acpi, wm5102_acpi_match);
+#endif
+
static struct spi_driver arizona_spi_driver = {
.driver = {
.name = "arizona",
.owner = THIS_MODULE,
.pm = &arizona_pm_ops,
+#ifdef CONFIG_ACPI
+ .acpi_match_table = wm5102_acpi_match,
+#endif
.of_match_table = of_match_ptr(arizona_of_match),
},
.probe = arizona_spi_probe,
@@ -107,3 +129,4 @@ module_spi_driver(arizona_spi_driver);
MODULE_DESCRIPTION("Arizona SPI bus interface");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("spi:WM510205");