Re: [PATCH] i2c: designware: Get HCNT/LCNT values from dts

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

 



On Mon, Nov 15, 2021 at 10:35:55AM +0100, Lawrence,Wang wrote:
> From: "Wang, Lawrence" <lawrence.wang@xxxxxxxxxxxxxxx>
> 
> 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





[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