Received: by 10.192.165.148 with SMTP id m20csp5094132imm; Tue, 24 Apr 2018 13:39:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48H9DamdETlTdG6qwaCSYomcH6qHd4TUYFAz7RKPkTlDOvGgmN+g6yHPPYRIm2pI/rIaoFZ X-Received: by 10.98.93.153 with SMTP id n25mr16556724pfj.143.1524602341846; Tue, 24 Apr 2018 13:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524602341; cv=none; d=google.com; s=arc-20160816; b=DG8z/2389siopWq9Y1sITMQz4ZZdj4UatHU48PrWAC+lK8OLyuM8sjPt1uPUJZDUnk IqXNe2Ar+ULI2h5oHq2LeCmzoRh30X4d1swIqBIj/lZ2hpoXnYt4v5uw62NgdhjRuYXD bpNdbbRO9ao7U9X9ija0WtSc8PA6j31POM7DxTj1XMJYCpob1xZtTp7OzJMS96oUVbio GnJyi/nfb2oIx1BZcPYSM9gpdjYI1uF8H2gv4PL9XHf7+s7/RPlHc+NZO2UOSNvkYUgI 7x8YW5IpbTvo28l2ySqV/ZbvjZ8W5irE4Wt4+30YORCG5Q0H9vWi4xt4ayaJCdg+GRKH Sm8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=oxqXz069agUL3SDeSoI4R4b6vpTcxh5VGtgFZcrxD4w=; b=GQkkgcWD5Wgi0H167P5KDwVZwR++YgrGZbxpa/snA8jT/PmRGX/R4jPlyxhocRwswI rnh4i0T9eKzfQ9u0vDECP7jTa/AHTkHfhc6wti/EP91P7LNMfjFXd2/zgjCRaDFAfGtx dTojmi76IupK0mflaI0gbrJG/rPaT/OoRYwhNocZynFKaIDymJFkNfrT/4fYzVAFThmU slVClccrQFMjKY+MeFx56KExRkKi3OCr0hOAi7oCC3Z/O329IaBJYEEb9/NHPLhBDQ6s dpwo0uhisfFREy48oV1hLiyH/+rEYB/3WdXA5NqCsgOI3u9egXwhssMAaVUhekB55xTV Nmbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=L7ntAbFg; dkim=pass header.i=@codeaurora.org header.s=default header.b=L7ntAbFg; 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 q15si12262519pgc.303.2018.04.24.13.38.47; Tue, 24 Apr 2018 13:39:01 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=L7ntAbFg; dkim=pass header.i=@codeaurora.org header.s=default header.b=L7ntAbFg; 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 S1751418AbeDXUdg (ORCPT + 99 others); Tue, 24 Apr 2018 16:33:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40398 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeDXUdU (ORCPT ); Tue, 24 Apr 2018 16:33:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DC38660C65; Tue, 24 Apr 2018 20:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524601999; bh=12l1nPTVXZSe8Z9c29JsSztEyG11QEyoERo9wumddgQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=L7ntAbFg/MIBpWjDMI9/CgFwSgFTOVIcyCssnuu2RisJvmjNN5FAj1RzuWhU3LNDW kTxJahHN9vxfjWTL+ichjCr7Psr9ulGg8F+900r0zj0h7kGyvktEKdX6GR9eqR1u80 zTdjMGH4V+8oJh1P3UGjMUAXDi+Id0ggkic8b2u4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.46.164.143] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: collinsd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A90FC6081C; Tue, 24 Apr 2018 20:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524601999; bh=12l1nPTVXZSe8Z9c29JsSztEyG11QEyoERo9wumddgQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=L7ntAbFg/MIBpWjDMI9/CgFwSgFTOVIcyCssnuu2RisJvmjNN5FAj1RzuWhU3LNDW kTxJahHN9vxfjWTL+ichjCr7Psr9ulGg8F+900r0zj0h7kGyvktEKdX6GR9eqR1u80 zTdjMGH4V+8oJh1P3UGjMUAXDi+Id0ggkic8b2u4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A90FC6081C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=collinsd@codeaurora.org Subject: Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver To: Lina Iyer Cc: Stephen Boyd , broonie@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, rnayak@codeaurora.org References: <71fab82672524b95632cdb588c16edfc9711866a.1521246069.git.collinsd@codeaurora.org> <152165924074.91116.13025068669916027026@swboyd.mtv.corp.google.com> <493c1f5d-df99-ca68-0f90-a7937a696f5d@codeaurora.org> <152411734938.46528.9676451637772936597@swboyd.mtv.corp.google.com> <20180420224445.GB18235@codeaurora.org> From: David Collins Message-ID: <916d2d21-3a49-5818-3fb9-66b2ee5fc359@codeaurora.org> Date: Tue, 24 Apr 2018 13:33:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20180420224445.GB18235@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>>> + ret = cmd_db_ready(); >>>>>> + if (ret < 0) { >>>>>> + if (ret != -EPROBE_DEFER) >>>>>> + dev_err(dev, "Command DB not available, >>>>>> ret=%d\n", ret); >>>>>> + return ret; >>>>>> + } >>>>> >>>>> We should just make rpmh parent device call cmd_db_ready() so that these >>>>> devices aren't even populated until then and so that cmd_db_ready() is >>>>> only in one place. Lina? >>>> >>>> Let's see if Lina has qualms about this plan. >>> >>> Sounds like you're ok with it. >> >> Sure, I'll remove this check if Lina agrees to add it in the rpmh driver. >> > We want to make the RSC nodes child of Command DB? That way we probe the > controllers only if the command DB is ready? > > I could do that. Just so you know, there is are no strict directives to > use Command DB. If a driver knows the information it needs to pass to > the accelerator, it may choose to skip command DB completely. The ask here is for the rpmh driver to call cmd_db_ready() in its probe function and return any error encountered (e.g. -EPROBE_DEFER). I suppose that specifying the rpmh rsc device tree node as a child inside of the command DB node could achieve the same result. However, that seems a little hacky as the rsc device is describing a hardware block physically found on the SoC as opposed to a subcomponent of the command DB SMEM data structure. I defer to device tree maintainers to comment on the acceptability of this approach. While technically it is possible for an rpmh consumer to intrinsically know the addresses for its resources without polling command DB, do you have any examples where this is the case? Thanks, David -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project