[PATCH 1/3] powerpc/83xx/mcu: Add OF match table

Anton Vorontsov avorontsov at mvista.com
Mon May 3 03:17:59 EST 2010


of_modalias_node() matches on the first (most specific) entries,
which isn't quite practical but it was discussed that this won't
change.

The bindings specifies verbose information for the devices, but
it doesn't fit in the I2C ID's 20 characters limit. The limit won't
change, and the bindings won't change either as they're correct.

So we have to put an explicit OF matching table for the
MPC8349E-mITX-compatible MCUs.

(Previously this was in the OF exception table, see commit
4c3ed7d61bd474380e0d3e1eb0da164942f7c84e.)

Signed-off-by: Anton Vorontsov <avorontsov at mvista.com>
---
 arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index 59b0ed1..70798ac 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -160,10 +160,16 @@ static const struct i2c_device_id mcu_ids[] = {
 };
 MODULE_DEVICE_TABLE(i2c, mcu_ids);
 
+static struct of_device_id mcu_of_match_table[] __devinitdata = {
+	{ .compatible = "fsl,mcu-mpc8349emitx", },
+	{ },
+};
+
 static struct i2c_driver mcu_driver = {
 	.driver = {
 		.name = "mcu-mpc8349emitx",
 		.owner = THIS_MODULE,
+		.of_match_table = mcu_of_match_table,
 	},
 	.probe = mcu_probe,
 	.remove	= __devexit_p(mcu_remove),
-- 
1.7.0.5



More information about the devicetree-discuss mailing list