dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Rob Clark <robdclark@gmail.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/msm: drop _clk suffix from clk names
Date: Mon, 30 Jan 2017 10:15:14 -0800	[thread overview]
Message-ID: <87y3xsh0st.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <20170130164921.20744-5-robdclark@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1082 bytes --]

Rob Clark <robdclark@gmail.com> writes:

> Suggested by Rob Herring.  We still support the old names for
> compatibility with downstream android dt files.
>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Rob Clark <robdclark@gmail.com>

Huh, I don't think I would have cleaned up DT bindings in exchange for
adding driver code like this.  But the code seems correct, so other than
one optional suggestion:

Reviewed-by: Eric Anholt <eric@anholt.net>

> +struct clk *msm_clk_get(struct platform_device *pdev, const char *name)
> +{
> +	struct clk *clk;
> +	char name2[32];
> +
> +	clk = devm_clk_get(&pdev->dev, name);
> +	if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER)
> +		return clk;
> +
> +	snprintf(name2, sizeof(name2), "%s_clk", name);
> +
> +	clk = devm_clk_get(&pdev->dev, name2);
> +	if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER)
> +		dev_warn(&pdev->dev, "Using legacy clk name binding.  Use "
> +				"\"%s\" instead of \"%s\"\n", name, name2);

Drop the second "|| PTR_ERR(clk)" case, so that you only get one warning
printed at boot if deferring happens?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-01-30 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 16:49 [PATCH 0/4] drm/msm: cleanup gpu bindings Rob Clark
     [not found] ` <20170130164921.20744-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-30 16:49   ` [PATCH 1/4] drm/msm: remove qcom, gpu-pwrlevels bindings Rob Clark
     [not found]     ` <20170130164921.20744-2-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-30 18:21       ` Eric Anholt
     [not found]         ` <87vaswh0i9.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2017-01-30 18:35           ` [PATCH 1/4] drm/msm: remove qcom,gpu-pwrlevels bindings Rob Clark
     [not found]             ` <CAF6AEGt8mj8S+iv8aHVwyqm3f-5NhzmRv5Ajv5TmJXee5YLxVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30 19:56               ` [PATCH 1/4] drm/msm: remove qcom, gpu-pwrlevels bindings Eric Anholt
2017-02-01 23:26               ` Jordan Crouse
2017-02-01 17:01       ` Rob Herring
2017-01-30 16:49   ` [PATCH 2/4] drm/msm: drop qcom,chipid Rob Clark
2017-01-30 18:09     ` Eric Anholt
     [not found]       ` <874m0gifmf.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2017-01-30 18:19         ` Rob Clark
     [not found]           ` <CAF6AEGuK9TCdRmyaj4tk3+uu5L5Xvf1T3Kz8gZynX331VqSMfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30 19:54             ` Eric Anholt
2017-01-30 20:28               ` Rob Clark
2017-02-01 17:09     ` Rob Herring
2017-02-01 17:25       ` Rob Clark
2017-01-30 16:49   ` [PATCH 3/4] drm/msm: drop quirks binding Rob Clark
2017-01-30 18:12     ` Eric Anholt
2017-01-30 16:49   ` [PATCH 4/4] drm/msm: drop _clk suffix from clk names Rob Clark
2017-01-30 18:15     ` Eric Anholt [this message]
     [not found]       ` <87y3xsh0st.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2017-01-30 18:26         ` Rob Clark
2017-02-01 17:11     ` Rob Herring

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=87y3xsh0st.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@gmail.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