There must be something else wrong with your configuration.<br>On my Lite5200B fsl_i2c_probe gets called with no changes to the driver.<br><br>The kernel version is 2.6.22-rc7<br><br>The relevant part of my device tree is:
<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; i2c@3d00 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; device_type = &quot;i2c&quot;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; compatible = &quot;mpc5200b-i2c\0mpc5200-i2c\0fsl-i2c&quot;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cell-index = &lt;0&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; reg = &lt;3d00 40&gt;;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; interrupts = &lt;2 f 0&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; interrupt-parent = &lt;&amp;mpc5200_pic&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fsl5200-clocking;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; i2c@3d40 {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; device_type = &quot;i2c&quot;;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; compatible = &quot;mpc5200b-i2c\0mpc5200-i2c\0fsl-i2c&quot;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cell-index = &lt;1&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; reg = &lt;3d40 40&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; interrupts = &lt;2 10 0&gt;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; interrupt-parent = &lt;&amp;mpc5200_pic&gt;;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fsl5200-clocking;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br><br>I turned on DEBUG in drivers/base/dd.c and a call to pr_debug in the probe routine<br>and here are the relevant log messages:<br><br>[&nbsp;&nbsp; 27.258245] platform: Matched Device 
fsl-i2c.0 with Driver fsl-i2c<br>[&nbsp;&nbsp; 27.258269] platform: Probing driver fsl-i2c with device fsl-i2c.0<br>[&nbsp;&nbsp; 27.258299] I2C: here in fsl_i2c_probe<br>[&nbsp;&nbsp; 27.258732] bound device &#39;fsl-i2c.0&#39; to driver &#39;fsl-i2c&#39;
<br>[&nbsp;&nbsp; 27.258756] platform: Bound Device fsl-i2c.0 to Driver fsl-i2c<br>[&nbsp;&nbsp; 27.258776] platform: Matched Device fsl-i2c.1 with Driver fsl-i2c<br>[&nbsp;&nbsp; 27.258789] platform: Probing driver fsl-i2c with device fsl-i2c.1<br>[&nbsp;&nbsp; 
27.258821] I2C: here in fsl_i2c_probe<br>[&nbsp;&nbsp; 27.259269] bound device &#39;fsl-i2c.1&#39; to driver &#39;fsl-i2c&#39;<br>[&nbsp;&nbsp; 27.259293] platform: Bound Device fsl-i2c.1 to Driver fsl-i2c<br><br>John<br><br><div><span class="gmail_quote">
On 7/5/07, <b class="gmail_sendername">John Rigby</b> &lt;<a href="mailto:jcrigby@gmail.com">jcrigby@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
kd,<br><br>Ok, obviously It doesn&#39;t work the way I thought.&nbsp; Hopefully someone who does<br>understand this will comment.<br><span class="sg"><br>John</span><div><span class="e" id="q_1139691b642835ba_2"><br><br><div><span class="gmail_quote">
On 7/4/07, <b class="gmail_sendername">Kári Davíđsson
</b> &lt;<a href="mailto:kari.davidsson@marel.is" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">kari.davidsson@marel.is</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

John, thank you for your answare.<br><br>Enabling CONFIG_FSL_SOC only enabled the execution of the init function (fsl_i2c_init())<br>of the fsl-i2c driver (i2c-mpc.c). The .probe function of the driver was never called<br>

until I converted the driver to the OF model and added the .match_table to the driver structure.<br><br>Then I get the .probe function (fsl_i2c_probe()) called and the i2c bus set up.<br><br>Similar thing happens for the i2c device PCF8563 
i.e., the init functin of the driver (pcf8563_init())<br>is called the driver is registered with the kernel, but the .probe (pcf8563_probe()) is never called.<br><br>The driver pcf8563 has _NO_ exported structures or functions so I basically have no handle on it
<br>that I can utilize in board specific setup.<br><br>The way I suspect this is supposed to work is that from the board settup files I would do<br>rtc_dev = platform_device_register_simple(&quot;pcf8563&quot;, -1, NULL, 0);
<br>which should later trigger the calling of the pcf8563_probe() function.<br><br>This is doing things in the same way as the fsl i2c code, i.e.<br>i2c_dev = platform_device_register_simple(&quot;i2c&quot;, i, r, 2);<br>

which by the way does not work untill I have converted the fsl_i2c (i2c-mpc.c) driver to the OF structure.<br><br>So still the method of gluing together the OF drivers and non OF drivers eludes me.<br><br>rg<br>kd<br><br>

P.S. I did check the 2.6.21-RC7-git3 and found that the i2c-mpc.c and the rtc-pcf85763.c are basically the same<br>as what I am working with in 2.6.20+<br>________________________________<br><br>From: John Rigby [mailto:
<a href="mailto:jcrigby@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jcrigby@gmail.com</a>]<br>Sent: 3. júlí 2007 16:31<br>To: Kári Davíđsson<br>Cc: <a href="mailto:linuxppc-embedded@ozlabs.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">linuxppc-embedded@ozlabs.org
</a><br>Subject: Re: OF devices and non OF devices<br><br><br>One place to find binding between OF devices and non OF devices is in arch/powerpc/sysdev/fsl_soc.c
<br>The typical pattern is:<br>&nbsp;&nbsp;&nbsp;&nbsp;if of_find_compatible_node &quot;of-device-name&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;platform_device_register_simple &quot;&quot;platform-device-name&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;platform_device_add_data ...<br><br><br>

<br>On 7/3/07, Kári Davíđsson &lt;<a href="mailto:kari.davidsson@marel.is" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">kari.davidsson@marel.is</a>&gt; wrote:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hi,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am attempting to get some non OF devices working for an mpc 5200 board, in particular
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PCF8563 RTC.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This device has an non OF device interface which I believe is correct. After all it should work<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on non OF platforms.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I have managed to get the board to run the i2c initialization (and probe) for the fsl-mpc i2c driver by
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;converting the fsl-mpc i2c driver to OF driver (I found some patch here that I based this work on).<br><br><br>fsl-i2c is one of the devices handled by fsl_soc.c so you shouldn&#39;t need to change anything to
<br>make it work in the latest kernel.&nbsp;&nbsp;CONFIG_FSL_SOC was only added to lite5200_defconfig recently so<br>that may explain why it&#39;s not on in your kernel.<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Since the PCF8563 driver is not OF driver only its initaliziation code is run but the .probe function
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of the driver is never run. Basically (as far as I can understand) the .probe is never run because the<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver is not an OF driver.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I could convert the PCF8563 driver to OF driver and make it work for our puposes but I feel this is
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1) Wrong<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2) therefore wasted work.<br><br><br>Since the driver must run on non OF platforms then it should not be converted.&nbsp;&nbsp;You just need to add a platform_device_register somewhere.<br>I don&#39;t think fsl_soc.c is&nbsp;&nbsp;the right place since it is not part of an freescale SOC.
<br>You could probably put it in a board specific startup routine.<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;What seems to elude me is some glue that glues together the OF part of the driver space to the non OF part<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of the driver space.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Any hints or pointers on where to find this glue?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Regards,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kd<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;P.S. Kernel is post 2.6.20.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kári Davíđsson&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <a href="mailto:kari.davidsson@marel.is" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

kari.davidsson@marel.is</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hugbúnađargerđ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <a href="http://www.marel.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.marel.com</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tel: 563-8156 Fax: +354 563 8001
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Iceland<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_______________________________________________
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Linuxppc-embedded mailing list<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:Linuxppc-embedded@ozlabs.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Linuxppc-embedded@ozlabs.org</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://ozlabs.org/mailman/listinfo/linuxppc-embedded" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
</a><br><br><br><br>_______________________________________________<br>Linuxppc-embedded mailing list<br><a href="mailto:Linuxppc-embedded@ozlabs.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Linuxppc-embedded@ozlabs.org</a><br><a href="https://ozlabs.org/mailman/listinfo/linuxppc-embedded" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://ozlabs.org/mailman/listinfo/linuxppc-embedded</a><br></blockquote></div><br>
</span></div></blockquote></div><br>