]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcde58c6d80a34ed862f029bec75c96a51126950d
tree29dc1e65d1146fe938e68c8eaaca5872a0a83731
parente8218b3b3ee9213805d12cfbe8e1cf62fc39f2fb
media: atomisp: fix clock rate frequency setting

changeset 509d70d66761 ("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: 509d70d66761 ("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