Re: [PATCH 1/2] powerpc: i2c-mpc: preserve I2C clocking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/3/31 Wolfram Sang <w.sang@xxxxxxxxxxxxxx>:
>
>> >> -
>> >> -  mpc_i2c_setclock(i2c);
>> >> +
>> >> +  if (set_clock)
>> >> +          mpc_i2c_setclock(i2c);
>> >
>> > Can't we drop 'set_clock' with something like this here?
>> >
>> > +   if (!of_get_property(op->node, "fsl,preserve-clocking", NULL)) {
>> > +
>> > +           if (of_get_property(op->node, "dfsrr", NULL))
>> > +                   i2c->flags |= FSL_I2C_DEV_SEPARATE_DFSRR;
>> > +
>> > +           if (of_device_is_compatible(op->node, "fsl,mpc5200-i2c") ||
>> > +               of_device_is_compatible(op->node, "mpc5200-i2c"))
>> > +                   i2c->flags |= FSL_I2C_DEV_CLOCK_5200;
>> > +
>> > +           mpc_i2c_setclock(i2c);
>> > +   }
>>
>> No, because the I2C registers are not yet mapped.
>
> Sorry, I used misleading words :) With 'here' I meant 'at this
> position', i.e. insert my above block where mpc_i2c_setclock was used
> anyway.

I agree.  The extra flag makes the flow more complex.  The code block
should be moved down.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux