Hi Simon,

2014-12-04 0:13 GMT+09:00 Simon Glass <s...@chromium.org>:

>> If each driver does not have .set_bus_speed handler,
>> we cannot change the bus speed
>> because changing the bus speed involves some hardware
>> register(s) setting.
>>
>> We should not change i2c->speed_hz without changing the
>> actual speed.
>>
>> I think the code should be:
>>
>>
>>         if (ops->set_bus_speed) {
>>                 ret = ops->set_bus_speed(bus, speed);
>>                 if (ret)
>>                         return ret;
>>                 i2c->speed_hz = speed;
>>         }
>>
>>
>
> I'll add a comment. The idea is that the driver can check the speed
> and give an error here rather than on the next xfer(). Also if it
> wants to change the clocks here then it can do so. But otherwise it is
> OK to deal with the speed change on the next xfer.
>

OK. Makes sense.




-- 
Best Regards
Masahiro Yamada
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to