Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229881

Re: [PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates.

From Stephen Warren <swarren@wwwdotorg.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates.
Date 2015-09-22 04:20 +0200
Message-ID <qbllv-8sA-3@gated-at.bofh.it> (permalink)
References <q7ivU-6Gg-13@gated-at.bofh.it> <q7ivU-6Gg-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/10/2015 03:22 PM, Eric Anholt wrote:
> There are a pair of SPI masters and a mini UART that were last minute
> additions.  As a result, they didn't get integrated in the same way as
> the other gates off of the VPU clock in CPRMAN.

> diff --git a/drivers/clk/bcm/clk-bcm2835-aux.c b/drivers/clk/bcm/clk-bcm2835-aux.c

> +static int bcm2835_aux_clk_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct clk_onecell_data *onecell;
> +	const char *parent;
> +	struct clk *parent_clk;
> +	void __iomem *reg;
> +
> +	parent_clk = of_clk_get(dev->of_node, 0);
> +	if (IS_ERR(parent_clk))
> +		return PTR_ERR(parent_clk);
> +	parent = __clk_get_name(parent_clk);

I think all the comments I made on probe() for the main bcm2835 clock
driver likely apply here too.

Also, is it "legal" for clock drivers to use __clk_get_name()? I thought
that was a clock core internal function, but may be wrong. I would have
expected to be able to pass a clock object when registering clocks
rather than a clock name, but oh well.

BTW, I like how this series shows how useful it is for someone with full
knowledge of the HW to come up with the DT bindings for a HW module;
once you know how the HW is actually designed, the correct binding ends
up being a lot easier to come up with, rather than guessing:-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. Eric Anholt <eric@anholt.net> - 2015-09-11 00:30 +0200
  Re: [PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary peripheral clock gates. Martin Sperl <martin@sperl.org> - 2015-09-11 12:30 +0200
  Re: [PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary  peripheral clock gates. Stephen Warren <swarren@wwwdotorg.org> - 2015-09-22 04:20 +0200
  Re: [PATCH 2/3] clk: bcm2835: Add a driver for the auxiliary  peripheral clock gates. Stephen Boyd <sboyd@codeaurora.org> - 2015-10-02 02:20 +0200

csiph-web