Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933012AbbHYXsA (ORCPT ); Tue, 25 Aug 2015 19:48:00 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:35601 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755183AbbHYXr7 (ORCPT ); Tue, 25 Aug 2015 19:47:59 -0400 MIME-Version: 1.0 In-Reply-To: <7htwrn6l7g.fsf@deeprootsystems.com> References: <1440487486-6154-1-git-send-email-wxt@rock-chips.com> <1440487486-6154-5-git-send-email-wxt@rock-chips.com> <7hfv37axhj.fsf@deeprootsystems.com> <7htwrn6l7g.fsf@deeprootsystems.com> Date: Tue, 25 Aug 2015 16:47:58 -0700 Message-ID: Subject: Re: [RESEND PATCH v16 4/4] ARM: dts: add the support power-domain node on RK3288 SoCs From: Dmitry Torokhov To: Kevin Hilman Cc: Doug Anderson , Caesar Wang , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Ulf Hansson , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Rockchip SoC..." , Tomasz Figa , "linux-kernel@vger.kernel.org" , Kumar Gala , Russell King , Rob Herring , Arnd Bergmann , Linus Walleij , Ian Campbell , "devicetree@vger.kernel.org" , "jinkun.hong" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1345 Lines: 30 On Tue, Aug 25, 2015 at 3:45 PM, Kevin Hilman wrote: > Doug Anderson writes: > >> To put things in a >> concrete way, for pd_vio we'd go through the entire device tree >> ourselves and find all properties that look like "power-domains = >> <&power RK3288_PD_VIO>;". We'd then find the parent of those >> properties and look for a property named "clocks". We'd then iterate >> over all those clocks and turn those on. Did I get that right? > > ... but you make it sound like more work than it is. The genpd already > keeps a list of devices that refer to the power domain. In fact, the > genpd 'attach' method can be platform-specific, so could be used to keep > track of a list (or a subset) of clocks which are needed for reset. That is not really workable: the attach and detach happen in probe/remove path; if you do not have driver for the device you will miss the clocks for it. And the quirk of this SoC is that we need to turn all clocks during domain transition, regardless of whether there is a driver for all devices. Thanks. -- Dmitry -- 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/