lkml.org 
[lkml]   [2023]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v14 18/18] media: i2c: ds90ub953: Support non-sync mode
On Fri, Jun 16, 2023 at 04:59:22PM +0300, Tomi Valkeinen wrote:
> Add support for FPD-Link non-sync mode with external clock. The only
> thing that needs to be added is the calculation for the clkout.

...

> + switch (priv->mode) {
> + case UB953_MODE_SYNC:
> + if (priv->hw_data->is_ub971)
> + return priv->plat_data->bc_rate * 160ull;
> + else
> + return priv->plat_data->bc_rate / 2 * 160ull;

Redundant 'else'.

Do I understand correctly you don't want to fallthrough because it will give
±160 in the rate (depending if it's even or odd)?

> + case UB953_MODE_NONSYNC_EXT:
> + /* CLKIN_DIV = 1 always */
> + return clk_get_rate(priv->clkin) * 80ull;
> +
> + default:
> /* Not supported */
> return 0;
> }

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-06-16 16:48    [W:0.225 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site