devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [i2c-mpc.c] adding entry for mpc8360
       [not found] ` <4F0EFD78.3020708-4VtgCsEi+FIybS5Ee8rs3A@public.gmane.org>
@ 2012-01-13  7:26   ` Wolfgang Grandegger
       [not found]     ` <4F0FDCAA.1040203-ynQEQJNshbs@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2012-01-13  7:26 UTC (permalink / raw)
  To: Richard Retanubun
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	Devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

Hello,

I added the "devicetree-discuss" ml.

On 01/12/2012 04:34 PM, Richard Retanubun wrote:
> Hello,
> 
> I am wondering if it is okay to add .compatible entries for mpc8360 and
> declare its data structure
> to mpc-i2c.c
> 
> something like this:
> 
> {.compatible = "fsl,mpc8360-i2c", .data = &mpc_i2c_data_8360, },
> 
> static struct mpc_i2c_data mpc_i2c_data_8360 __devinitdata = {
>     .setup = mpc_i2c_setup_8xxx,
> };
> 
> or is the intended approach to match the closest thing to your CPU (in
> this case mpc8313) ?

Yes, it is intended to use the name of the compatible device, see:

http://lxr.linux.no/#linux+v3.2.1/arch/powerpc/boot/dts/kmeter1.dts#L69

Wolfgang

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [i2c-mpc.c] adding entry for mpc8360
       [not found]     ` <4F0FDCAA.1040203-ynQEQJNshbs@public.gmane.org>
@ 2012-01-13 16:05       ` Richard Retanubun
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Retanubun @ 2012-01-13 16:05 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

On 13/01/12 02:26 AM, Wolfgang Grandegger wrote:
> Hello,
>
> I added the "devicetree-discuss" ml.
>
> On 01/12/2012 04:34 PM, Richard Retanubun wrote:
>> Hello,
>>
>> I am wondering if it is okay to add .compatible entries for mpc8360 and
>> declare its data structure
>> to mpc-i2c.c
>>
>> something like this:
>>
>> {.compatible = "fsl,mpc8360-i2c", .data =&mpc_i2c_data_8360, },
>>
>> static struct mpc_i2c_data mpc_i2c_data_8360 __devinitdata = {
>>      .setup = mpc_i2c_setup_8xxx,
>> };
>>
>> or is the intended approach to match the closest thing to your CPU (in
>> this case mpc8313) ?
>
> Yes, it is intended to use the name of the compatible device, see:
>
> http://lxr.linux.no/#linux+v3.2.1/arch/powerpc/boot/dts/kmeter1.dts#L69
>
> Wolfgang
Thanks for the speedy response!

Two observations based on recent experiments to share with the ml:

1. The i2c-mpc does not take into account freescale APP note AN2919
    and for boards where the default dfsr setting violates condition #1.
    the i2c_transfer will exit with a -EIO due to timeout once in a while.

2. For boards that uses u-boot as bootloader, its fsl-i2c driver implements
    condition #1 checking. Thus using fsl,preserve-clocking is the way to go
    for now.

Richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-13 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4F0EFD78.3020708@ruggedcom.com>
     [not found] ` <4F0EFD78.3020708-4VtgCsEi+FIybS5Ee8rs3A@public.gmane.org>
2012-01-13  7:26   ` [i2c-mpc.c] adding entry for mpc8360 Wolfgang Grandegger
     [not found]     ` <4F0FDCAA.1040203-ynQEQJNshbs@public.gmane.org>
2012-01-13 16:05       ` Richard Retanubun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).