[PATCH 11/15] mfd mc13xxx: Add devicetree support
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 12 16:06:43 EDT 2012
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mfd/mc13xxx.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
index a62eca8..4577816 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)
--
1.7.10.4
More information about the barebox
mailing list