aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2015-08-20 03:07:22 -0400
committerLee Jones <lee.jones@linaro.org>2015-08-24 10:27:59 -0400
commita78ea195f77a8ed2c5f3108a8cdb9a26ebd474d8 (patch)
tree4a5b9a957d0e09d19bc793c88a8687bbe1f5b153
parent1e955bece28f0f464c2db03c7e12951cea65fab6 (diff)
mfd: cros_ec: spi: Add OF match table
The Documentation/devicetree/bindings/mfd/cros-ec.txt DT binding doc lists "google,cros-ec-spi" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/cros_ec_spi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
index 16f228dc243f..30a296b4e748 100644
--- a/drivers/mfd/cros_ec_spi.c
+++ b/drivers/mfd/cros_ec_spi.c
@@ -701,6 +701,12 @@ static int cros_ec_spi_resume(struct device *dev)
701static SIMPLE_DEV_PM_OPS(cros_ec_spi_pm_ops, cros_ec_spi_suspend, 701static SIMPLE_DEV_PM_OPS(cros_ec_spi_pm_ops, cros_ec_spi_suspend,
702 cros_ec_spi_resume); 702 cros_ec_spi_resume);
703 703
704static const struct of_device_id cros_ec_spi_of_match[] = {
705 { .compatible = "google,cros-ec-spi", },
706 { /* sentinel */ },
707};
708MODULE_DEVICE_TABLE(of, cros_ec_spi_of_match);
709
704static const struct spi_device_id cros_ec_spi_id[] = { 710static const struct spi_device_id cros_ec_spi_id[] = {
705 { "cros-ec-spi", 0 }, 711 { "cros-ec-spi", 0 },
706 { } 712 { }
@@ -710,6 +716,7 @@ MODULE_DEVICE_TABLE(spi, cros_ec_spi_id);
710static struct spi_driver cros_ec_driver_spi = { 716static struct spi_driver cros_ec_driver_spi = {
711 .driver = { 717 .driver = {
712 .name = "cros-ec-spi", 718 .name = "cros-ec-spi",
719 .of_match_table = of_match_ptr(cros_ec_spi_of_match),
713 .owner = THIS_MODULE, 720 .owner = THIS_MODULE,
714 .pm = &cros_ec_spi_pm_ops, 721 .pm = &cros_ec_spi_pm_ops,
715 }, 722 },