# Re: \[PATCH 2/2\] clk: initial clock driver for TWL6030

- List: linux-arm-kernel
- 1 message, 1 author
- Page: https://ratatoskr.run/linux-arm-kernel/2014/07/8094896/t

## Re: \[PATCH 2/2\] clk: initial clock driver for TWL6030

- From: Tero Kristo \<hidden\>
- Date: 2014-07-31 13:16:17 
- Message: https://ratatoskr.run/linux-arm-kernel/2014/07/8094896.md

```text
<snip>

>>> +static int of_twl6030_clk32kg_probe(struct platform_device *pdev)
>>> +{
>>> +	struct device_node *node = pdev->dev.of_node;
>>> +	struct clk *clk;
>>> +
>>> +	if (!node)
>>> +		return -ENODEV;
>>> +
>>> +	clk = devm_clk_get(&pdev->dev, "clk32kg");
>>> +	if (IS_ERR(clk))
>>> +		return PTR_ERR(clk);
>>> +
>>> +	return clk_prepare(clk);
>>
>> This is plain wrong as pointed out earlier. The driver that uses the
>> clock must enable it.
>
> Understood. I'll change it to clk_prepare_enable().

Nono, remove it completely from here. The clock driver should not enable 
itself by default. The clock itself has some sort of customer somewhere 
(like am33xx-wifi driver), which should request for the clock and enable 
it only when needed.

-Tero
```
