lkml.org 
[lkml]   [2021]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2c: designware: Get HCNT/LCNT values from dts
On Mon, Nov 15, 2021 at 10:35:55AM +0100, Lawrence,Wang wrote:
> From: "Wang, Lawrence" <lawrence.wang@nokia-sbell.com>
>
> Current code support config the HCNT/LCNT only via ACPI method. for those
> platform that not support ACPI, will get the HCNT/LCNT value based on input
> clock. But it is not always accuracy. for example in some platform will get
> lower speed(320khz) in fast mode, and get faster speed(105khz/even more) in
> standard mode.
>
> This patch makes it possible for the non-ACPI platform to pass more optimal
> HCNT/LCNT values to the core driver via dts if they are known beforehand.
> If these are not set we use the calculated values.

Besides the fact it misses DT schema update, why this is needed at all?
What's wrong with the existing DT timings?

So far seems NAK to me.

...

> + ret = device_property_read_u16_array(dev->dev, "dw-i2c-scl-timing",
> + (u16 *)&i2c_scl_timing, sizeof(i2c_scl_timing)/sizeof(u16));
> + if (ret)
> + return;

No, you have to have one property per each value AFAIU DT schema requirements,
Ask Rob Herring about it.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2021-11-15 11:20    [W:0.080 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site