lkml.org 
[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V5 3/8] clk: qcom: Add ipq apss pll driver
From
Date
Quoting Sivaprakash Murugesan (2020-05-24 03:04:41)
> diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c
> new file mode 100644
> index 0000000..aafdaa7
> --- /dev/null
> +++ b/drivers/clk/qcom/apss-ipq-pll.c
> @@ -0,0 +1,97 @@
> +// SPDX-License-Identifier: GPL-2.0
> +// Copyright (c) 2018, The Linux Foundation. All rights reserved.
> +#include <linux/platform_device.h>
> +#include <linux/regmap.h>
> +#include <linux/module.h>

Sort the includes above, also add clk-provider.h because this is a clk
provider.

> +
> +#include "clk-alpha-pll.h"
> +
> +static const u8 ipq_pll_offsets[] = {
[...]
> +
> +static int apss_ipq_pll_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct regmap *regmap;
> + struct resource *res;
> + void __iomem *base;
> + int ret;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + base = devm_ioremap_resource(dev, res);

Use devm_platform_ioremap_resource()?

> + if (IS_ERR(base))
> + return PTR_ERR(base);
> +
> + regmap = devm_regmap_init_mmio(&pdev->dev, base,
> + &ipq_pll_regmap_config);

Tabbing is off here. &ipq_pll_regmap_config should line up with the (
above.

> + if (IS_ERR(regmap))
> + return PTR_ERR(regmap);

\
 
 \ /
  Last update: 2020-05-27 04:31    [W:0.089 / U:1.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site