Re: [PATCH] i2c: designware: Do not require clock when SSCN and FFCN are provided

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

 



On Wed, Dec 16, 2015 at 08:44:34AM -0600, Suravee Suthikulpanit wrote:
> I am trying to avoid having to hard-coded clock frequency value in the
> driver. Would it be alright to not return w/ error, and just do the
> following?
> 
> 	dev->clk = devm_clk_get(&pdev->dev, NULL);
> 	if (!IS_ERR(dev->clk))
> 		dev->get_clk_rate_khz = i2c_dw_get_clk_rate_khz;
> 
> This should work for the Intel case when clock is also provided.

Does it also work when clk_prepare_enable()/disable() is called for the
clock (in PM callbacks for example)? If yes, then I don't see problems
with what you are suggesting.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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