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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html