Re: [PATCH v2 06/11] media: i2c: Add ov7251_pll_configure()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 25, 2022 at 12:07:48AM +0000, Daniel Scally wrote:
> Rather than having the pll settings hidden inside mode blobs, define
> them in structs and use a dedicated function to set them. This makes
> it simpler to extend the driver to support other frequencies for both
> the external clock and desired link frequency.

...

> +static const struct ov7251_pll1_cfg ov7251_pll1_cfg_24_mhz_240_mhz = {
> +	.pre_div = 0x03,
> +	.mult = 0x64,
> +	.div = 0x01,
> +	.pix_div = 0x0a,
> +	.mipi_div = 0x05

+ Comma.

> +};
> +
> +static const struct ov7251_pll2_cfg ov7251_pll2_cfg_24_mhz = {
> +	.pre_div = 0x04,
> +	.mult = 0x28,
> +	.div = 0x00,
> +	.sys_div = 0x05,
> +	.adc_div = 0x04

Ditto.

> +};
> +
> +static const struct ov7251_pll_cfgs ov7251_pll_cfgs_24_mhz = {
> +	.pll2 = &ov7251_pll2_cfg_24_mhz,
> +	.pll1 = {
> +		[OV7251_LINK_FREQ_240_MHZ] = &ov7251_pll1_cfg_24_mhz_240_mhz,
> +	}

Ditto.

> +};
> +
> +static const struct ov7251_pll_cfgs *ov7251_pll_cfgs[] = {
> +	[OV7251_24_MHZ] = &ov7251_pll_cfgs_24_mhz

Ditto.

> +};

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux