[RFC] Rework of i2c-mpc.c - Freescale i2c driver

Matt Sealey matt at genesi-usa.com
Tue Nov 6 06:22:05 EST 2007


Jon Smirl wrote:

> i2c at 3d40 {
> 	device_type = "i2c";
> 	compatible = "mpc5200b-i2c\0mpc5200-i2c\0fsl-i2c";
> 	cell-index = <1>;
> 	reg = <3d40 40>;
> 	interrupts = <2 10 0>;
> 	interrupt-parent = <&mpc5200_pic>;
> 	fsl5200-clocking;
> 
> 	rtc at 32 {
> 		device_type = "rtc";
> 		compatible = "epson,pcf8564";
> 		reg = <51>;
> 	};
> };

My only comment would be that the fsl5200-clocking property is
totally redundant.

Drivers can look at the compatible property (mpc5200b-i2c and
mpc5200-i2c) to match up what special needs the driver may need.
Even if it was just fsl-i2c, it could/should be implicit that
this device is the onboard i2c and the parent node is ostensibly
going to be marked as an MPC52xx SoC.. or it can look for the
mpc5200-cdm node. There is no reason to invent a property just
so you can do a property search when it replaces code of the
same size to do a node or compatible search..

-- 
Matt Sealey <matt at genesi-usa.com>
Genesi, Manager, Developer Relations



More information about the Linuxppc-dev mailing list