summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-08-17 09:29:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-23 21:15:12 +0200
commit6158ddb71600916ce3790d33972de5a5ab6fa3a3 (patch)
tree6604910608e3d146ea3f8b46456b2d5263e75356 /drivers/mfd
parent86dcc1754e50d4ba830c2a840024d392d609f1a7 (diff)
downloadbarebox-6158ddb71600916ce3790d33972de5a5ab6fa3a3.tar.gz
barebox-6158ddb71600916ce3790d33972de5a5ab6fa3a3.tar.xz
mfd mc13xxx: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/mc13xxx.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
index a62eca80da..4577816662 100644
--- a/drivers/mfd/mc13xxx.c
+++ b/drivers/mfd/mc13xxx.c
@@ -336,6 +336,16 @@ static int mc_probe(struct device_d *dev, enum mc13xxx_mode mode)
return 0;
}
+static __maybe_unused struct of_device_id mc13892_dt_ids[] = {
+ {
+ .compatible = "fsl,mc13892",
+ }, {
+ .compatible = "fsl,mc13783",
+ }, {
+ /* sentinel */
+ }
+};
+
#ifdef CONFIG_I2C
static int mc_i2c_probe(struct device_d *dev)
{
@@ -345,6 +355,7 @@ static int mc_i2c_probe(struct device_d *dev)
static struct driver_d mc_i2c_driver = {
.name = "mc13xxx-i2c",
.probe = mc_i2c_probe,
+ .of_compatible = DRV_OF_COMPAT(mc13892_dt_ids),
};
static int mc_i2c_init(void)
@@ -363,6 +374,7 @@ static int mc_spi_probe(struct device_d *dev)
static struct driver_d mc_spi_driver = {
.name = "mc13xxx-spi",
.probe = mc_spi_probe,
+ .of_compatible = DRV_OF_COMPAT(mc13892_dt_ids),
};
static int mc_spi_init(void)