Re: (subset) [PATCH v2 2/4] clk: get correct ops for clk_enable() and clk_disable()

2023-12-15 Thread Sean Anderson
On Sun, 19 Nov 2023 06:10:06 +0800, Yang Xiwen wrote:
> assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations
> are called on clocks.
> 
> This fixes the incorrect enable_count issue as described in [1].
> 
> [1]: 
> https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/
> 
> [...]

Applied, thanks!

[2/4] clk: get correct ops for clk_enable() and clk_disable()
  https://source.denx.de/u-boot/custodians/u-boot-clk/-/commit/3fb2d3d6acba

Best regards,
-- 
Sean Anderson 


Re: [PATCH v2 2/4] clk: get correct ops for clk_enable() and clk_disable()

2023-12-15 Thread Sean Anderson

On 11/18/23 17:10, Yang Xiwen via B4 Relay wrote:

From: Yang Xiwen 

assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations
are called on clocks.

This fixes the incorrect enable_count issue as described in [1].

[1]: 
https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/

Signed-off-by: Yang Xiwen 
---
  drivers/clk/clk-uclass.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 3b5e3f9c86..3e9d68feb3 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -640,6 +640,7 @@ int clk_enable(struct clk *clk)
if (CONFIG_IS_ENABLED(CLK_CCF)) {
/* Take id 0 as a non-valid clk, such as dummy */
if (clk->id && !clk_get_by_id(clk->id, )) {
+   ops = clk_dev_ops(clkp->dev);
if (clkp->enable_count) {
clkp->enable_count++;
return 0;
@@ -699,6 +700,7 @@ int clk_disable(struct clk *clk)
  
  	if (CONFIG_IS_ENABLED(CLK_CCF)) {

if (clk->id && !clk_get_by_id(clk->id, )) {
+   ops = clk_dev_ops(clkp->dev);
if (clkp->flags & CLK_IS_CRITICAL)
return 0;
  



Reviewed-by: Sean Anderson 


[PATCH v2 2/4] clk: get correct ops for clk_enable() and clk_disable()

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen 

assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations
are called on clocks.

This fixes the incorrect enable_count issue as described in [1].

[1]: 
https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/

Signed-off-by: Yang Xiwen 
---
 drivers/clk/clk-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 3b5e3f9c86..3e9d68feb3 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -640,6 +640,7 @@ int clk_enable(struct clk *clk)
if (CONFIG_IS_ENABLED(CLK_CCF)) {
/* Take id 0 as a non-valid clk, such as dummy */
if (clk->id && !clk_get_by_id(clk->id, )) {
+   ops = clk_dev_ops(clkp->dev);
if (clkp->enable_count) {
clkp->enable_count++;
return 0;
@@ -699,6 +700,7 @@ int clk_disable(struct clk *clk)
 
if (CONFIG_IS_ENABLED(CLK_CCF)) {
if (clk->id && !clk_get_by_id(clk->id, )) {
+   ops = clk_dev_ops(clkp->dev);
if (clkp->flags & CLK_IS_CRITICAL)
return 0;
 

-- 
2.39.2