Re: [PATCH 4/4] drm/msm: drop _clk suffix from clk names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 30, 2017 at 1:15 PM, Eric Anholt <eric@xxxxxxxxxx> wrote:
> Rob Clark <robdclark@xxxxxxxxx> writes:
>
>> Suggested by Rob Herring.  We still support the old names for
>> compatibility with downstream android dt files.
>>
>> Cc: Rob Herring <robh@xxxxxxxxxx>
>> Signed-off-by: Rob Clark <robdclark@xxxxxxxxx>
>
> 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@xxxxxxxxxx>
>
>> +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?

oh, good point.. I've fixed that up locally.  I don't think we'd
actually hit this case currently for gpu clks, since for gpu this
codepath happens on first open() of the device file.  But I should
mention I have a slighly sneaky ulterior motive, which is that we
could use the same cleanup for display related clks (which do
currently upstream use the _clk suffix).

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux