Re: [PATCH 1/1] i2c: designware: Fix wrong setting for {ss,fs}_{h,l}cnt registers

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

 



Hi,

On Thu, Aug 1, 2024 at 10:10 PM Jarkko Nikula
<jarkko.nikula@xxxxxxxxxxxxxxx> wrote:
> You are correct, indeed driver miscalculates those timing parameters in
> that case.
>
> However debugging point of view below is misleading since it doesn't
> necessarily match with HW registers since they are not touched and have
> values what bootloader has left there.
>
>         i2c_designware i2c_designware.0: Standard Mode HCNT:LCNT = 0:0

Indeed. The debug prints show the incorrect info. Thanks for reminding this.

> Would it work if patch just reads the dev->ss_hcnt, dev->ss_lcnt and so
> on from HW registers in case they and ic_clk are not set in
> i2c_dw_set_timings_master()? Then debug prints and HW values are in sync.

That makes sense. The v2 version:
https://lore.kernel.org/linux-i2c/20240802130143.26908-1-ahuang12@xxxxxxxxxx/T/#u

Please kindly review. Thank you.

-- Adrian





[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