Received: by 10.223.176.5 with SMTP id f5csp1700835wra; Thu, 8 Feb 2018 01:56:01 -0800 (PST) X-Google-Smtp-Source: AH8x225Fe4fPU7WUgRzxbHMIScR8FhlkSBxjGhahtBOhogxxkqLew3ZJZlI8/yJkZqHxWLV3Mrj2 X-Received: by 10.99.120.139 with SMTP id t133mr83939pgc.382.1518083761048; Thu, 08 Feb 2018 01:56:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518083761; cv=none; d=google.com; s=arc-20160816; b=Hsqmu0A+QXra4AUEnjM5ZZOLbVHyvHOhW8uMUV1oEMhk5EwU4yJYYlJ8SixDcYfFTc PYh19AKgXVEJLK9WKl/cy1YkPXktZQkdDmTly51NFSC++AMMTHdh93FUIBvCmtG8cfIE RhPZ14eoYj4ACIidBCLVS5klVy+wlVIquzllIwDJWnhgd/6DpPGGCBab4gNpOmFgekLy JjtEXFDJNGotQACWawWAA+UMh9RXdBHWi9Y8RSeq5xuqHBZ/SZ2dDsEREOatogCdPIkK ZB54UGI9yxcEoyiT/K1tWvpDojwVofaD6f7MKeoQQCuf97yWS4N4Vv+tysaLZwgD7pdn uyuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=TrRQN5WffXl4D2w3Y93OH8p3ELSa6dayi5r88zsqAto=; b=bRVhTD9E1eecDweCOyDCEP2FLLRAR3keBmaqlW6g0pfBR/46uXVqxGhD040q8rxmok P6Ot+PqfyhLT7jnL1h9nlG4jnohlJUedvG/XcWO67MMnyvcWXswddhKve8CevsM1/4Jm aoC7jiHjXGlJhKFj95Xyat1H/0fa64GlT13etiQSJVcR+86LPKeEurFy1+sugwHgM4Zy DFIO1dCqqANZv9D0HmMKfMBnXmQpEHQ0166ePCDY93+UHnMDjarx0v0o1y2L0kB0Nunc zpHcCF2GiPW1vhQrHukTukZx4d+8CsYQj19A7FYqZzB+BinfRVhriWU0zqJrGtgP+vcE GnXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=DRvNn5+W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si2201927pgc.482.2018.02.08.01.55.46; Thu, 08 Feb 2018 01:56:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=DRvNn5+W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752278AbeBHJyw (ORCPT + 99 others); Thu, 8 Feb 2018 04:54:52 -0500 Received: from mail-ot0-f194.google.com ([74.125.82.194]:41558 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752237AbeBHJyu (ORCPT ); Thu, 8 Feb 2018 04:54:50 -0500 Received: by mail-ot0-f194.google.com with SMTP id r23so3753380ote.8 for ; Thu, 08 Feb 2018 01:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TrRQN5WffXl4D2w3Y93OH8p3ELSa6dayi5r88zsqAto=; b=DRvNn5+WNpqHy+yjnngJXJ1I2MNllCsJvtOWxT2BL062cwnErx0Peua2qH2b3mkdk7 /tHlTMBvS3pnPbRFlNkzD8Gy0tZIkvuSOydXE4A+xfjvUsTn79J1GG+U34ymso3NAOGF t2ynoKnJ0hu5HM24UnGtNwELPTTS6gynIVbU1i9evtIuCV4McaUB4CTLjzwC7J4BifaY azmBokcxBz51jupufnnRAhOWVlHJZZqsVBSfM988dOdJnM7SCX/+onOIbUh1BwUGjFQ+ hTVHqqDSKrLDU68APmo+w4sTthMIX9yhLQzPs0OR1hTLA0Rhz7IZOA8XzJuUN9PhruoB zg6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TrRQN5WffXl4D2w3Y93OH8p3ELSa6dayi5r88zsqAto=; b=M+PCrnMXu6esGk+aSkCUjL+reco3S0Zc3SBnbxK0EYWzF/7OI0siiEkHm8suHo0+kO JEGI53rMGliRFUPMTsRKmu0worWEzc+AdM2DdiYVYyYlJFSZ3J1TftrVBHexI+6m2k5w Fb6RiLMHSblIpxOnW1lBXLXM5mJVOaCCkbJlT/Ezds4nRi+h/UosNmJRdj1I7l/VUHPc 45R5ZKyv3DPuStG4fdyvMNuVMb+02m/HrjArGcPF1DJ90XfLarYSr4Oamo/EHIHMV3a6 yeW5caVUESMZWRNS994v8u4cdzu3vdY6I141t9/fZsIRRNoSformTMxLHe7Fus9C5spH Fglg== X-Gm-Message-State: APf1xPApplHWcvh3yLzr3Mjshyxl0tNfkgp/tWicWJ72sBKUq3Js2gmg 79TaxBcO2eLx5gp2gCx67DQ1RqGRT8JPJzPBbjvrfw== X-Received: by 10.157.30.132 with SMTP id n4mr70407otn.280.1518083690018; Thu, 08 Feb 2018 01:54:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.42.71 with HTTP; Thu, 8 Feb 2018 01:54:49 -0800 (PST) In-Reply-To: <65f2690c-c605-3c66-9d8a-9a882aaf446d@ti.com> References: <20180207134553.13510-1-brgl@bgdev.pl> <20180207134553.13510-3-brgl@bgdev.pl> <65f2690c-c605-3c66-9d8a-9a882aaf446d@ti.com> From: Bartosz Golaszewski Date: Thu, 8 Feb 2018 10:54:49 +0100 Message-ID: Subject: Re: [PATCH 2/7] soc: davinci: new genpd driver To: Sekhar Nori Cc: Rob Herring , Mark Rutland , Kevin Hilman , Russell King , David Lechner , devicetree , Linux Kernel Mailing List , Linux ARM , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-08 10:30 GMT+01:00 Sekhar Nori : > On Wednesday 07 February 2018 07:15 PM, Bartosz Golaszewski wrote: >> + /* >> + * DaVinci always uses a single clock for power-management. We assume >> + * it's the first one in the clocks property. >> + */ >> + clk = of_clk_get(dev->of_node, 0); >> + if (IS_ERR(clk)) >> + return PTR_ERR(clk); > > We already get this today with drivers/base/power/clock_ops.c once > .con_ids list is dropped from pm_clk_notifier_block (which I think it > should). > > If there is no reason to introduce thus functionality at this stage, > perhaps we should wait till such a time when its clearly needed? > > Thanks, > Sekhar If I understand correctly: once we drop the con_ids list, we end up calling clk_get(dev, NULL) from pm_clk_acquire(), which matches against the clock with NULL con_id, which may not necessarily be the first clock in the list. I'm working on extending the psc driver with the power-domain code (as suggested by David), which should be much smaller and simplier - how about that? Thanks, Bartosz