9
0
Fork 0

mfd mc13xxx: Add devicetree support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-08-17 09:29:40 +02:00
parent 86dcc1754e
commit 6158ddb716
1 changed files with 12 additions and 0 deletions

View File

@ -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)