Hi Michael, On Tue, Dec 22, 2020 at 10:32:31AM +0100, michael.srba@xxxxxxxxx wrote: > From: Michael Srba <Michael.Srba@xxxxxxxxx> > > This patch adds 1% tolerance on input clock frequency, similar to other > camera sensor drivers. > > Signed-off-by: Michael Srba <Michael.Srba@xxxxxxxxx> > > --- > > changes since v1: default to exactly 24MHz when `clock-frequency` is not > present > changes since v2: remove the ability to set the clock to a specific > frequency, since assigned-clocks + assigned-clock-rates can be used 1:1 > for the same purpose > > --- > drivers/media/i2c/imx219.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c > index f64c0ef7a897..fd2157eadac4 100644 > --- a/drivers/media/i2c/imx219.c > +++ b/drivers/media/i2c/imx219.c > @@ -1443,8 +1443,9 @@ static int imx219_probe(struct i2c_client *client) > return PTR_ERR(imx219->xclk); > } > > + /* this driver currently expects 24MHz; allow 1% tolerance */ > imx219->xclk_freq = clk_get_rate(imx219->xclk); > - if (imx219->xclk_freq != IMX219_XCLK_FREQ) { > + if (imx219->xclk_freq < 23760000 || imx219->xclk_freq > 24240000) { Where do you need this? Do you have a system where you get a frequency that's a bit off? I don't think this is the right way to fix this but on the other hand for register list based drivers there hardly is one. > dev_err(dev, "xclk frequency not supported: %d Hz\n", > imx219->xclk_freq); > return -EINVAL; -- Regards, Sakari Ailus