diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2020-08-28 08:24:18 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-12-07 15:59:59 +0100 |
commit | 38c94eb8d7aa60e32ed6da9e4ecd4b5a1597760e (patch) | |
tree | 7db4114ad24da8e43981c0bf2029db3c88f72be7 /drivers/media/i2c/ccs/ccs-core.c | |
parent | 3e2db036c9b706e68016db7610c333ed926425be (diff) | |
download | linux-stable-38c94eb8d7aa60e32ed6da9e4ecd4b5a1597760e.tar.gz linux-stable-38c94eb8d7aa60e32ed6da9e4ecd4b5a1597760e.tar.bz2 linux-stable-38c94eb8d7aa60e32ed6da9e4ecd4b5a1597760e.zip |
media: ccs-pll: Check for derating and overrating, support non-derating sensors
Some sensors support derating (VT domain speed faster than OP) or
overrating (VT domain speed slower than OP). While this was supported for
the driver, the hardware support for the feature was never verified. Do
that now, and for those devices without that support, VT and OP speeds
have to match.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ccs/ccs-core.c')
-rw-r--r-- | drivers/media/i2c/ccs/ccs-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 21158e6d0159..fa878ecf55a7 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3224,6 +3224,13 @@ static int ccs_probe(struct i2c_client *client) if (CCS_LIM(sensor, CLOCK_TREE_PLL_CAPABILITY) & CCS_CLOCK_TREE_PLL_CAPABILITY_FLEXIBLE_OP_PIX_CLK_DIV) sensor->pll.flags |= CCS_PLL_FLAG_FLEXIBLE_OP_PIX_CLK_DIV; + if (CCS_LIM(sensor, FIFO_SUPPORT_CAPABILITY) & + CCS_FIFO_SUPPORT_CAPABILITY_DERATING) + sensor->pll.flags |= CCS_PLL_FLAG_FIFO_DERATING; + if (CCS_LIM(sensor, FIFO_SUPPORT_CAPABILITY) & + CCS_FIFO_SUPPORT_CAPABILITY_DERATING_OVERRATING) + sensor->pll.flags |= CCS_PLL_FLAG_FIFO_DERATING | + CCS_PLL_FLAG_FIFO_OVERRATING; sensor->pll.op_bits_per_lane = CCS_LIM(sensor, OP_BITS_PER_LANE); sensor->pll.ext_clk_freq_hz = sensor->hwcfg.ext_clk; sensor->pll.scale_n = CCS_LIM(sensor, SCALER_N_MIN); |