Re: [PATCH 2/2] i2c: designware: allow fine tuning tuning waveform from device tree

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

 



On 01/02/2024 05:46, Aahil Awatramani wrote:
>  
> +static void i2c_parse_cnt(struct device *dev, char *prop_name, u16 *cnt)
> +{
> +	u32 tmp_cnt;
> +	int ret;
> +
> +	ret = device_property_read_u32(dev, prop_name, &tmp_cnt);
> +	if (ret)
> +		return;
> +	*cnt = tmp_cnt;
> +}
> +
>  static int dw_i2c_of_configure(struct platform_device *pdev)
>  {
>  	struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
> @@ -146,6 +157,15 @@ static int dw_i2c_of_configure(struct platform_device *pdev)
>  		break;
>  	}
>  
> +	i2c_parse_cnt(&pdev->dev, "i2c-scl-ss-hcnt", &dev->ss_hcnt);

Please post your DTS and post results of testing it against bindings.

Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux