OSDN Git Service

media: atomisp: fix clock rate frequency setting
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 8 May 2020 06:55:19 +0000 (08:55 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:20 +0000 (12:32 +0200)
commit9b7632e8fe7f7e0d75a61dccf2917e55022ecb66
tree29dc1e65d1146fe938e68c8eaaca5872a0a83731
parentf770e91a7b64043dd730b59b5e62d82e71faec63
media: atomisp: fix clock rate frequency setting

changeset d5426f4c2eba ("media: staging: atomisp: use clock framework for camera clocks")
removed a platform-specific code to set the clock rate, in favor of
using the Kernel clock framework.

However, instead of passing the frequency for clk_set_rate(),
it is passing either 0 or 1.

Looking at the original patchset, it seems that there are two
possible configurations for the ISP:

0 - it will use a 25 MHz XTAL to provide the clock;
1 - it will use a PLL with is set to 19.2 MHz
    (only for the CHT version?)

Eventually, different XTALs and/or PLL frequencies might
be possible some day, so, re-implent the logic for it to be
more generic.

Fixes: d5426f4c2eba ("media: staging: atomisp: use clock framework for camera clocks")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c