mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Heiko Stuebner <heiko@sntech.de>
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>,
	shawn.lin@rock-chips.com, dmitry.torokhov@gmail.com,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Elaine Zhang <zhangqing@rock-chips.com>,
	linux-arm-kernel@lists.infradead.org, wxt@rock-chips.com
Subject: Re: [PATCH] soc: rockchip: power-domain: use clk_bulk APIs
Date: Mon, 5 Mar 2018 17:05:33 +0800	[thread overview]
Message-ID: <709dc2eb-e34b-9603-3a49-3e61afb073e4@rock-chips.com> (raw)
In-Reply-To: <2683576.o9hXnVZqaR@phil>

Hi Heiko,

On 2018/3/2 23:43, Heiko Stuebner wrote:
> Hi Jeffy,
> 
> Am Mittwoch, 28. Februar 2018, 13:41:43 CET schrieb Jeffy Chen:
>> Use clk_bulk APIs, and also add error handling for clk enable.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> 
> [...]
> 
>> -	for (i = 0; i < clk_cnt; i++) {
>> -		clk = of_clk_get(node, i);
>> -		if (IS_ERR(clk)) {
>> -			error = PTR_ERR(clk);
>> +	pd->num_clks = of_count_phandle_with_args(node, "clocks",
>> +						  "#clock-cells");
>> +
>> +	pd->clks = devm_kzalloc(pmu->dev, pd->num_clks * sizeof(pd->clks[0]),

This doesn't work for rk3399, as the pd_vio doesn't have any clocks
attached.

[    0.713241] rockchip-pm-domain 
ff310000.power-management:power-controller: failed to handle node 
pd_vio: -12
[    0.714615] rockchip-pm-domain: probe of 
ff310000.power-management:power-controller failed with error -12


I think Jeffy's v2 is coming, so I assume you will drop this version?


> 
> applied for 4.17, after changing to devm_kcalloc like below:
> 
> pd->clks = devm_kcalloc(pmu->dev, pd->num_clks, sizeof(*pd->clks),
> 
> 
> Thanks
> Heiko
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
> 
> 
> 

      reply	other threads:[~2018-03-05  9:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 12:41 Jeffy Chen
2018-03-02 15:43 ` Heiko Stuebner
2018-03-05  9:05   ` Shawn Lin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=709dc2eb-e34b-9603-3a49-3e61afb073e4@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=heiko@sntech.de \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=wxt@rock-chips.com \
    --cc=zhangqing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®