aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/cros_ec_i2c.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2015-08-25 07:48:10 +0200
committerLee Jones <lee.jones@linaro.org>2015-10-26 14:48:55 +0000
commit385c0012dfa0b1cdcb16907d847eb2a720f17a9a (patch)
treed748f3a152a6ce336e1f1ccbd6c77e6ba8f46f1f /drivers/mfd/cros_ec_i2c.c
parentMerge branches 'ib-extcon-mfd-4.4', 'ib-mfd-i2c-v4.4', 'ib-mfd-power-4.4', 'ib-mfd-regmap-4.4' and 'ib-mfd-regulator-4.4' into ibs-for-mfd-merged (diff)
downloadlinux-dev-385c0012dfa0b1cdcb16907d847eb2a720f17a9a.tar.xz
linux-dev-385c0012dfa0b1cdcb16907d847eb2a720f17a9a.zip
mfd: cros_ec_i2c: Add OF match table
The Documentation/devicetree/bindings/mfd/cros-ec.txt DT binding doc lists "google,cros-ec-i2c" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the I2C 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>
Diffstat (limited to 'drivers/mfd/cros_ec_i2c.c')
-rw-r--r--drivers/mfd/cros_ec_i2c.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c
index d06e4b46db80..56a466469664 100644
--- a/drivers/mfd/cros_ec_i2c.c
+++ b/drivers/mfd/cros_ec_i2c.c
@@ -344,6 +344,12 @@ static int cros_ec_i2c_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(cros_ec_i2c_pm_ops, cros_ec_i2c_suspend,
cros_ec_i2c_resume);
+static const struct of_device_id cros_ec_i2c_of_match[] = {
+ { .compatible = "google,cros-ec-i2c", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match);
+
static const struct i2c_device_id cros_ec_i2c_id[] = {
{ "cros-ec-i2c", 0 },
{ }
@@ -353,6 +359,7 @@ MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id);
static struct i2c_driver cros_ec_driver = {
.driver = {
.name = "cros-ec-i2c",
+ .of_match_table = of_match_ptr(cros_ec_i2c_of_match),
.pm = &cros_ec_i2c_pm_ops,
},
.probe = cros_ec_i2c_probe,