ASoC: Fix SPI driver binding for WM8987
Subsystems (3)
PATCH 1/1 ASoC: Fix SPI driver binding for WM8987
As we had no id_table only the driver name would be matched against meaning that WM8987 devices wouldn't be bound.
--- sound/soc/codecs/wm8750.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8750.c +8 -1
@@ -779,11 +779,18 @@ static int __devexit wm8750_spi_remove(struct spi_device *spi)return 0 ; } +static const struct spi_device_id wm8750_spi_ids[] = { + {"wm8750" ,0 }, + {"wm8987" ,0 }, +}; +MODULE_DEVICE_TABLE (spi, wm8750_spi_id); +static struct spi_driver wm8750_spi_driver = { .driver = { - .name ="wm8750-codec" , + .name ="wm8750" , .owner =THIS_MODULE , }, + .id_table = wm8750_spi_ids, .probe = wm8750_spi_probe, .remove =__devexit_p (wm8750_spi_remove), };
Signature · 1 line
1.7.5.4
Quoted 3 lines · Mark Brown
As we had no
id_tableonly the driver name would be matched against meaning that WM8987 devices wouldn't be bound.
Subject line is for wrong codec but otherwise (with new subject line)
Quoted 29 lines
Signed-off-by Mark Brown <[email protected]>--- sound/soc/codecs/wm8750.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)sound/soc/codecs/wm8750.c +8
-1@@ -779,11 +779,18 @@ static int __devexit wm8750_spi_remove(struct spi_device *spi)return 0 ; } +static const struct spi_device_id wm8750_spi_ids[] = { + {"wm8750" ,0 }, + {"wm8987" ,0 }, +}; +MODULE_DEVICE_TABLE (spi, wm8750_spi_id); +static struct spi_driver wm8750_spi_driver = { .driver = { - .name ="wm8750-codec" , + .name ="wm8750" , .owner =THIS_MODULE , }, + .id_table = wm8750_spi_ids, .probe = wm8750_spi_probe, .remove =__devexit_p (wm8750_spi_remove), };
Quoted 5 lines · Liam Girdwood
Quoted 2 lines · Mark Brown
As we had no
id_tableonly the driver name would be matched against meaning that WM8987 devices wouldn't be bound.Subject line is for wrong codec but otherwise (with new subject line)
Hrm? Subject line says WM8987...
Quoted 8 lines · Mark Brown
Quoted 5 lines · Liam Girdwood
Quoted 2 lines · Mark Brown
As we had no
id_tableonly the driver name would be matched against meaning that WM8987 devices wouldn't be bound.Subject line is for wrong codec but otherwise (with new subject line)
Hrm? Subject line says WM8987...
But the diff said WM8750 iirc.
Liam
Quoted 5 lines · Liam Girdwood
Quoted 1 line · Mark Brown
Hrm? Subject line says WM8987...
But the diff said WM8750 iirc.
The issue being fixed is that the two devices are register compatible but for SPI we were only registering a device ID for wm8750, for I2C we'd got both IDs registered. The driver says wm8750 everywhere except the device IDs.
Liam Girdwood
Acked-byQuoted 11 lines · Mark Brown
Quoted 5 lines · Liam Girdwood
Quoted 1 line · Mark Brown
Hrm? Subject line says WM8987...
But the diff said WM8750 iirc.
The issue being fixed is that the two devices are register compatible but for SPI we were only registering a device ID for wm8750, for I2C we'd got both IDs registered. The driver says wm8750 everywhere except the device IDs.
Ah, ok - I would have just used WM8750 in subject instead.
Quoted 1 line · Liam Girdwood
Ah, ok - I would have just used WM8750 in subject instead.
It's specifically fixing wm8987, wm8750 was always fine but just happens to be in the same driver.