Browse Source

misc/at25, dt: support probing at25 SPI EEPROM from DT

The commit d6ae0d578d24303941c1424b049d2cae28277666 introduced devicetree
binding documentation for this driver, but the driver itself does not yet
support the documented compatible entry. Fix this by adding the documented
entry to the driver.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jan Luebbe 11 years ago
parent
commit
fbfdb6ed62
1 changed files with 7 additions and 0 deletions
  1. 7 0
      drivers/misc/eeprom/at25.c

+ 7 - 0
drivers/misc/eeprom/at25.c

@@ -462,10 +462,17 @@ static int at25_remove(struct spi_device *spi)
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
 
 
+static const struct of_device_id at25_of_match[] = {
+	{ .compatible = "atmel,at25", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, at25_of_match);
+
 static struct spi_driver at25_driver = {
 static struct spi_driver at25_driver = {
 	.driver = {
 	.driver = {
 		.name		= "at25",
 		.name		= "at25",
 		.owner		= THIS_MODULE,
 		.owner		= THIS_MODULE,
+		.of_match_table = at25_of_match,
 	},
 	},
 	.probe		= at25_probe,
 	.probe		= at25_probe,
 	.remove		= at25_remove,
 	.remove		= at25_remove,