mfd mc13xxx: Add devicetree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
86dcc1754e
commit
6158ddb716
|
@ -336,6 +336,16 @@ static int mc_probe(struct device_d *dev, enum mc13xxx_mode mode)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __maybe_unused struct of_device_id mc13892_dt_ids[] = {
|
||||||
|
{
|
||||||
|
.compatible = "fsl,mc13892",
|
||||||
|
}, {
|
||||||
|
.compatible = "fsl,mc13783",
|
||||||
|
}, {
|
||||||
|
/* sentinel */
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_I2C
|
#ifdef CONFIG_I2C
|
||||||
static int mc_i2c_probe(struct device_d *dev)
|
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 = {
|
static struct driver_d mc_i2c_driver = {
|
||||||
.name = "mc13xxx-i2c",
|
.name = "mc13xxx-i2c",
|
||||||
.probe = mc_i2c_probe,
|
.probe = mc_i2c_probe,
|
||||||
|
.of_compatible = DRV_OF_COMPAT(mc13892_dt_ids),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mc_i2c_init(void)
|
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 = {
|
static struct driver_d mc_spi_driver = {
|
||||||
.name = "mc13xxx-spi",
|
.name = "mc13xxx-spi",
|
||||||
.probe = mc_spi_probe,
|
.probe = mc_spi_probe,
|
||||||
|
.of_compatible = DRV_OF_COMPAT(mc13892_dt_ids),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mc_spi_init(void)
|
static int mc_spi_init(void)
|
||||||
|
|
Loading…
Reference in New Issue