Re: [PATCH 05/21] clock:Add driver for ADI ADSP-SC5xx PLL

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

 



On 12/09/2024 20:24, Arturs Artamonovs via B4 Relay wrote:
> From: Arturs Artamonovs <arturs.artamonovs@xxxxxxxxxx>
> 
> Implements clock tree, no dynamic pll rate change.
> 
> Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@xxxxxxxxxx>
> Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@xxxxxxxxxxx>
> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@xxxxxxxxxxx>
> Co-developed-by: Greg Malysa <greg.malysa@xxxxxxxxxxx>
> Signed-off-by: Greg Malysa <greg.malysa@xxxxxxxxxxx>
> ---
>  drivers/clk/adi/clk-adi-pll.c | 151 ++++++++++++++++++++++++++++++++++++++++++
>  drivers/clk/adi/clk.h         |  99 +++++++++++++++++++++++++++
>  2 files changed, 250 insertions(+)


How do you even build this code? Never built, so never tested?

> +struct clk *sc5xx_cgu_pll(const char *name, const char *parent_name,
> +	void __iomem *base, u8 shift, u8 width, u32 m_offset,
> +		spinlock_t *lock)
> +{
> +	struct clk_sc5xx_cgu_pll *pll;
> +	struct clk *clk;
> +	struct clk_init_data init;
> +
> +	pll = kzalloc(sizeof(*pll), GFP_KERNEL);
> +	if (!pll)
> +		return ERR_PTR(-ENOMEM);
> +
> +	init.name = name;
> +	init.flags = CLK_SET_RATE_PARENT;
> +	init.parent_names = &parent_name;
> +	init.num_parents = 1;
> +	init.ops = &clk_sc5xx_cgu_pll_ops;
> +
> +	pll->base = base;
> +	pll->hw.init = &init;
> +	pll->lock = lock;
> +	pll->shift = shift;
> +	pll->mask = GENMASK(width-1, 0) << shift;
> +	pll->msel = pll->mask + 1;
> +	pll->m_offset = m_offset;
> +
> +	clk = clk_register(NULL, &pll->hw);
> +	if (IS_ERR(clk)) {
> +		pr_err("%s: Failed to register, code %lu\n", __func__,
> +			PTR_ERR(clk));
> +	}
> +
> +	return clk;
> +}
> +
> +MODULE_DESCRIPTION("Analog Devices CLock PLL driver");
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Greg Malysa <greg.malysa@xxxxxxxxxxx>");
> +

Multiple patches have messy blank line handling...

> diff --git a/drivers/clk/adi/clk.h b/drivers/clk/adi/clk.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..e17aa719c2170149a6a1a60dd4390a29f06e7296
> --- /dev/null
> +++ b/drivers/clk/adi/clk.h


Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux