Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1085556imm; Fri, 22 Jun 2018 10:04:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI/ABwUaYAYlBfzklERpleL7X2SORuyKM0QyKSNLgxFUWmugO/mHrX5iJRcjE+zYe2XmEw+ X-Received: by 2002:a17:902:20ca:: with SMTP id v10-v6mr2474982plg.255.1529687063067; Fri, 22 Jun 2018 10:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529687063; cv=none; d=google.com; s=arc-20160816; b=0q5WJaNi9X3ZeQOEgxJIDG8yJIPpk3frl+kAjbmMOmPxgNtH3LVICmQzhaePTn4hnd aKY1ngn0AXAIMf3deRltkX9GBJ9tASoccrxneGy7wjZ7l85H8k42C2+iqDJtZi68wZJa i/zio8A4bv+Hmk8qGV+H4CSjCC8Emfvv4fs8nSTB3nct7FMZfybbWJzQWpRdbQd8LkLT yqdfOBHLUnt2Dy4DTqg4sRo1VDeasMWHVaCTVjXX1xaDwvIYMx8rXcm/KxQ2Rp3cX229 CwCDCtEEy/vWZ4xXZ1Gftu5OpTthilOujZdlZqbgKsmDPt284PgybACLT4qEkq3cM/il ec8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=kCCJPS2hm9qeEVxg5jjEQbFc5/9fqdwT4Ofnr0pC9t4=; b=KEOQU2oSsmx1lCIfBidU64DmTXWAvWCgg20GQVrI4NU5PLdqN4T7yPn4Y1/+qwqJAC O2rfMj6XYQdjqwcqjf4hODcn+gknM36c4AKlRSJv2nBWI6IbC+0FrUicDcoBKRPD1FE+ f1COFUZn/KMmVeblAhmDmghfXk6u1pWzHI4UTWTT7fnBDvpHYY3ys0zxwLpsO5glav6y MhpmzPSwX/1nwL/y0gyqUO148ZUGHGkOnfFSueCCgBaoUMUFQahoCnz6QkGThrkDjW3o 0i+gDeinuFwx/ZgQyaOpW12Lh4k1vxfocU05Kt0V7oB/yyHQ4UnWIuY3w7zIejIwq1kc VONA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QD9ixist; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31-v6si4599551pla.190.2018.06.22.10.04.03; Fri, 22 Jun 2018 10:04:23 -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=@linaro.org header.s=google header.b=QD9ixist; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754680AbeFVRC6 (ORCPT + 99 others); Fri, 22 Jun 2018 13:02:58 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:33701 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754441AbeFVRCz (ORCPT ); Fri, 22 Jun 2018 13:02:55 -0400 Received: by mail-pl0-f65.google.com with SMTP id 6-v6so3780125plb.0 for ; Fri, 22 Jun 2018 10:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kCCJPS2hm9qeEVxg5jjEQbFc5/9fqdwT4Ofnr0pC9t4=; b=QD9ixistRGNGmUiO1Vlwd9CszNmbjc+iMWIPA9gI/sHi5LCcNUtbHLo1+3dNmB+b4A yUaR1lk5Ds+Fy4slieoYOI3s9OXTXFg20cuEPK7NpEWUOwxlsyeobTfCgXrrQpIL0bpB edKK1rL2sd3bBTHE/c/FdY4Ur77f+pqLf8jrI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kCCJPS2hm9qeEVxg5jjEQbFc5/9fqdwT4Ofnr0pC9t4=; b=Qbrx/S0+XbXoJgsN8xJ+cdipI1Z3jwKktJpFgHGWBM2uScCTcSCS5/gqUcso+ZYwYm a9oks+SuEYt14ZwjGQuCH13Yl/19YlExReIhsSP8InrLoOrFTvwq7pQxNMwdZb6Ivpt3 wfAO75ktcLujRmyX4JyEIffZaY5lOKgAiIPCXZYYx6k+RN2pFikAOluMemJxFCG+7tJA TcPZYia+MzQsctDSbwkr7CymRV6OvZ9D/w909suco3H7L94Rg2KNoeXXaOQmqmVTtygz 0M95CvCMwI5B/j6TlGnX28OHr97pSY++T6ZLxTUNneK8qF9b1GxDXlhooF0mL2SUh0WV ioeA== X-Gm-Message-State: APt69E2YT8hsFwbJVdlmmxinNdNKj5Zm1tc4VtfWL8WBdyeYvEOx8yex Gd5bxlYouOP01eq+LtvsbHygqg== X-Received: by 2002:a17:902:1566:: with SMTP id b35-v6mr2519615plh.107.1529686974927; Fri, 22 Jun 2018 10:02:54 -0700 (PDT) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id 14-v6sm11057251pgc.63.2018.06.22.10.02.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 10:02:54 -0700 (PDT) Date: Fri, 22 Jun 2018 10:02:51 -0700 From: Bjorn Andersson To: Douglas Anderson Cc: andy.gross@linaro.org, tdas@codeaurora.org, collinsd@codeaurora.org, sboyd@kernel.org, ilina@codeaurora.org, broonie@kernel.org, rplsssn@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, David Brown , linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers: qcom: rpmh-rsc: Check cmd_db_ready() to help children Message-ID: <20180622170251.GD10336@builder> References: <20180618172230.241960-1-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180618172230.241960-1-dianders@chromium.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 18 Jun 10:22 PDT 2018, Douglas Anderson wrote: > Children of RPMh will need access to cmd_db. Rather than having each > child have code to check if cmd_db is ready let's add the check to > RPMh. > > Suggested-by: Stephen Boyd > Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > This code is based upon v11 of Lina and Raju's RPMh series. > > With this we'll be able to remove this boilerplate code from > clk-rpmh.c and qcom-rpmh-regulator.c. Neither of these files has > landed upstream yet but patches are pretty far along. > > drivers/soc/qcom/rpmh-rsc.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c > index 144a058407c0..ad85523bdd3b 100644 > --- a/drivers/soc/qcom/rpmh-rsc.c > +++ b/drivers/soc/qcom/rpmh-rsc.c > @@ -18,6 +18,7 @@ > #include > #include > > +#include > #include > #include > > @@ -621,6 +622,18 @@ static int rpmh_rsc_probe(struct platform_device *pdev) > struct rsc_drv *drv; > int ret, irq; > > + /* > + * Even though RPMh doesn't directly use cmd-db, all of its children > + * do. To avoid adding this check to our children we'll do it now. > + */ > + ret = cmd_db_ready(); > + if (ret) { > + if (ret != -EPROBE_DEFER) > + dev_err(&pdev->dev, "Command DB not available (%d)\n", > + ret); > + return ret; > + } > + > drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL); > if (!drv) > return -ENOMEM; > -- > 2.18.0.rc1.244.gcf134e6275-goog > > -- > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html