Skip to contentSkip to conversation

dmaengine: dw: platform: Mark 'hclk' clock optional

PATCH In review Andy Shevchenko 3 participants 4 messages Sep 24, 2019 – Oct 14, 2019

Subsystems (2)
lore
Share & tools
lore

Andy Shevchenko

author reviewer
#0 lore raw

PATCH 1/1 dmaengine: dw: platform: Mark 'hclk' clock optional

On some platforms the clock can be fixed rate, always running one and there is no need to do anything with it.

In order to support those platforms, switch to use optional clock.

Fixes f8d9ddbc2851 ("Enable iDMA 32-bit on Intel Elkhart Lake")

Depends-on: 60b8f0ddf1a9 ("clk: Add (devm_)clk_get_optional() functions")

---
 drivers/dma/dw/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dw/platform.c +1 -1
index 6a94f22b6637..bffc79a620ae 100644
@@ -66,7 +66,7 @@ static int dw_probe(struct platform_device *pdev)
 
 	data->chip = chip;
 
-	chip->clk = devm_clk_get(chip->dev, "hclk");
+	chip->clk = devm_clk_get_optional(chip->dev, "hclk");
 	if (IS_ERR(chip->clk))
 		return PTR_ERR(chip->clk);
 	err = clk_prepare_enable(chip->clk);
Signature · 1 line
2.23.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Andy Shevchenko

On some platforms the clock can be fixed rate, always running one and there is no need to do anything with it.

In order to support those platforms, switch to use optional clock.

Fixes f8d9ddbc2851 ("Enable iDMA 32-bit on Intel Elkhart Lake")

Depends-on: 60b8f0ddf1a9 ("clk: Add (devm_)clk_get_optional() functions")

---
 drivers/dma/dw/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
viresh
maintainer
#2 lore raw
In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

On some platforms the clock can be fixed rate, always running one and there is no need to do anything with it.

In order to support those platforms, switch to use optional clock.

Fixes f8d9ddbc2851 ("Enable iDMA 32-bit on Intel Elkhart Lake")

My script complained the Fixes doesnt match, you seem to have omitted the subsystem and driver name tags from this line.

I have fixed that and applied

Quoted 21 lines

Depends-on: 60b8f0ddf1a9 ("clk: Add (devm_)clk_get_optional() functions")

---
 drivers/dma/dw/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dw/platform.c +1 -1
index 6a94f22b6637..bffc79a620ae 100644
@@ -66,7 +66,7 @@ static int dw_probe(struct platform_device *pdev)
 
 	data->chip = chip;
 
-	chip->clk = devm_clk_get(chip->dev, "hclk");
+	chip->clk = devm_clk_get_optional(chip->dev, "hclk");
 	if (IS_ERR(chip->clk))
 		return PTR_ERR(chip->clk);
 	err = clk_prepare_enable(chip->clk);
Signature · 1 line
2.23.0
Signature · 1 line
~Vinod
#3 lore raw
Quoted 10 lines · Vinod Koul
Quoted 6 lines · Andy Shevchenko

On some platforms the clock can be fixed rate, always running one and there is no need to do anything with it.

In order to support those platforms, switch to use optional clock.

Fixes f8d9ddbc2851 ("Enable iDMA 32-bit on Intel Elkhart Lake")

My script complained the Fixes doesnt match, you seem to have omitted the subsystem and driver name tags from this line.

Better to automate getting these tags the way Documentation says.

Keep following in your gitconfig file:

[pretty]

        fixes = Fixes: %h (\"%s\")
        onelin = commit %h (\"%s\")

and then you can do:

git log --pretty=fixes OR --pretty=onelin

to get the tags in correct format.

Signature · 1 line
viresh