Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189671 > unrolled thread
| Started by | Vaibhav Hiremath <vaibhav.hiremath@linaro.org> |
|---|---|
| First post | 2015-07-22 08:30 +0200 |
| Last post | 2015-07-22 10:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 3/4] clk: 88pm800: Add clk provider driver for 88pm800 family of devices Vaibhav Hiremath <vaibhav.hiremath@linaro.org> - 2015-07-22 08:30 +0200
Re: [PATCH 3/4] clk: 88pm800: Add clk provider driver for 88pm800 family of devices Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-07-22 08:50 +0200
Re: [PATCH 3/4] clk: 88pm800: Add clk provider driver for 88pm800 family of devices Vaibhav Hiremath <vaibhav.hiremath@linaro.org> - 2015-07-22 10:20 +0200
| From | Vaibhav Hiremath <vaibhav.hiremath@linaro.org> |
|---|---|
| Date | 2015-07-22 08:30 +0200 |
| Subject | Re: [PATCH 3/4] clk: 88pm800: Add clk provider driver for 88pm800 family of devices |
| Message-ID | <pOVHs-78W-1@gated-at.bofh.it> |
On Wednesday 22 July 2015 02:22 AM, Stephen Boyd wrote:
> On 07/21/2015 12:36 PM, Vaibhav Hiremath wrote:
>>
>> On Wednesday 22 July 2015 12:40 AM, Stephen Boyd wrote:
>>> On 07/21/2015 04:07 AM, Vaibhav Hiremath wrote:
>>>> +
<snip>
>>>> +static int pm800_clk_remove(struct platform_device *pdev)
>>>> +{
>>>> + struct pm800_clk *pm800_clks = platform_get_drvdata(pdev);
>>>> + int i;
>>>> +
>>>> + of_clk_del_provider(pm800_clks[0].clk_np);
>>>> + /* Drop the reference obtained in pm800_clk_parse_dt */
>>>> + of_node_put(pm800_clks[0].clk_np);
>>>
>>> This is odd. Why are we keeping the reference in the driver?
>>>
>>
>> Honestly I do not have any good answer here. I have to admit that it is
>> getting carry forwarded from legacy driver.
>>
>
> Well we shouldn't do things if we don't know why we're doing them.
> Krzysztof?
>
Hold on,
After looking more in to this, it seems we really do not need it.
It is already taken care by
of_clk_add_provider() and
of_clk_del_provider()
Sorry for not investigating this before. Just left out from my eyes
somehow.
Actually I can cleanup clk-s2mps11.c driver as well, but only thing is
I can validate it, as I do not have platform to test it.
It should be trivial changes.
If somebody can help me out in validation I can submit the patch for
clk-s2mps11.c driver as well.
Thanks,
Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-07-22 08:50 +0200 |
| Message-ID | <pOW0O-7v8-11@gated-at.bofh.it> |
| In reply to | #1189671 |
On 22.07.2015 15:27, Vaibhav Hiremath wrote:
>
>
> On Wednesday 22 July 2015 02:22 AM, Stephen Boyd wrote:
>> On 07/21/2015 12:36 PM, Vaibhav Hiremath wrote:
>>>
>>> On Wednesday 22 July 2015 12:40 AM, Stephen Boyd wrote:
>>>> On 07/21/2015 04:07 AM, Vaibhav Hiremath wrote:
>>>>> +
>
> <snip>
>
>>>>> +static int pm800_clk_remove(struct platform_device *pdev)
>>>>> +{
>>>>> + struct pm800_clk *pm800_clks = platform_get_drvdata(pdev);
>>>>> + int i;
>>>>> +
>>>>> + of_clk_del_provider(pm800_clks[0].clk_np);
>>>>> + /* Drop the reference obtained in pm800_clk_parse_dt */
>>>>> + of_node_put(pm800_clks[0].clk_np);
>>>>
>>>> This is odd. Why are we keeping the reference in the driver?
>>>>
>>>
>>> Honestly I do not have any good answer here. I have to admit that it is
>>> getting carry forwarded from legacy driver.
>>>
>>
>> Well we shouldn't do things if we don't know why we're doing them.
>> Krzysztof?
I am really busy now so I am not following closely other discussions. I
assume you are referring to clk-s2mps11.c. The of_node_put() matches
of_get_child_by_name() when parsing DT.
So why not of_node_put() just after parsing DT? Well, the result of
of_get_child_by_name() is stored in state container for entire device
life-cycle so we can use it in of_clk_del_provider().
That was the idea behind it. If it looks incorrect I would be happy to
see a patch :) .
>>
>
> Hold on,
> After looking more in to this, it seems we really do not need it.
> It is already taken care by
>
> of_clk_add_provider() and
> of_clk_del_provider()
>
> Sorry for not investigating this before. Just left out from my eyes
> somehow.
>
>
> Actually I can cleanup clk-s2mps11.c driver as well, but only thing is
> I can validate it, as I do not have platform to test it.
> It should be trivial changes.
>
> If somebody can help me out in validation I can submit the patch for
> clk-s2mps11.c driver as well.
Sure, I can do this. The clock is present on few devices I can test.
Depending on the current workqueue it may take few days. Just please
mark the patch RFT so it won't be applied before receiving
reviewed/tested tags.
Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Vaibhav Hiremath <vaibhav.hiremath@linaro.org> |
|---|---|
| Date | 2015-07-22 10:20 +0200 |
| Message-ID | <pOXpU-1bI-29@gated-at.bofh.it> |
| In reply to | #1189680 |
On Wednesday 22 July 2015 12:16 PM, Krzysztof Kozlowski wrote:
> On 22.07.2015 15:27, Vaibhav Hiremath wrote:
>>
>>
>> On Wednesday 22 July 2015 02:22 AM, Stephen Boyd wrote:
>>> On 07/21/2015 12:36 PM, Vaibhav Hiremath wrote:
>>>>
>>>> On Wednesday 22 July 2015 12:40 AM, Stephen Boyd wrote:
>>>>> On 07/21/2015 04:07 AM, Vaibhav Hiremath wrote:
>>>>>> +
>>
>> <snip>
>>
>>>>>> +static int pm800_clk_remove(struct platform_device *pdev)
>>>>>> +{
>>>>>> + struct pm800_clk *pm800_clks = platform_get_drvdata(pdev);
>>>>>> + int i;
>>>>>> +
>>>>>> + of_clk_del_provider(pm800_clks[0].clk_np);
>>>>>> + /* Drop the reference obtained in pm800_clk_parse_dt */
>>>>>> + of_node_put(pm800_clks[0].clk_np);
>>>>>
>>>>> This is odd. Why are we keeping the reference in the driver?
>>>>>
>>>>
>>>> Honestly I do not have any good answer here. I have to admit that it is
>>>> getting carry forwarded from legacy driver.
>>>>
>>>
>>> Well we shouldn't do things if we don't know why we're doing them.
>>> Krzysztof?
>
> I am really busy now so I am not following closely other discussions. I
> assume you are referring to clk-s2mps11.c. The of_node_put() matches
> of_get_child_by_name() when parsing DT.
>
> So why not of_node_put() just after parsing DT? Well, the result of
> of_get_child_by_name() is stored in state container for entire device
> life-cycle so we can use it in of_clk_del_provider().
>
> That was the idea behind it. If it looks incorrect I would be happy to
> see a patch :) .
>
About to respond, I digged more on kobject stuff and sequence in
of/dynamic.c and
I think you are right, we need of_node_put, as a result of
of_get_child_by_name().
Stephen,
Please let me know if you think otherwise.
Thanks,
Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web