devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] clk: marvell: Move number of clocks into driver source
@ 2023-08-09 12:18 Duje Mihanović
  2023-08-09 12:18 ` [PATCH 1/4] clk: mmp2: " Duje Mihanović
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Duje Mihanović @ 2023-08-09 12:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-clk, linux-kernel, devicetree, Duje Mihanović

Hi,

In v4 of my PXA1908 series, Conor suggested that the NR_CLKS variables
in dt bindings should be moved to the respective driver source files
because these are not used by the device trees and so are needlessly
added to the ABI. This series does that for the rest of the Marvell
PXA/MMP SoCs.

Link: https://lore.kernel.org/r/20230808-produce-thievish-3ce1b86a114b@spud/
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
Duje Mihanović (4):
      clk: mmp2: Move number of clocks into driver source
      clk: pxa168: Move number of clocks to driver source
      clk: pxa1928: Move number of clocks to driver source
      clk: pxa910: Move number of clocks to driver source

 drivers/clk/mmp/clk-audio.c                    | 4 +++-
 drivers/clk/mmp/clk-of-mmp2.c                  | 4 +++-
 drivers/clk/mmp/clk-of-pxa168.c                | 4 +++-
 drivers/clk/mmp/clk-of-pxa1928.c               | 7 +++++--
 drivers/clk/mmp/clk-of-pxa910.c                | 4 +++-
 include/dt-bindings/clock/marvell,mmp2-audio.h | 1 -
 include/dt-bindings/clock/marvell,mmp2.h       | 1 -
 include/dt-bindings/clock/marvell,pxa168.h     | 1 -
 include/dt-bindings/clock/marvell,pxa1928.h    | 3 ---
 include/dt-bindings/clock/marvell,pxa910.h     | 1 -
 10 files changed, 17 insertions(+), 13 deletions(-)
---
base-commit: 52a93d39b17dc7eb98b6aa3edb93943248e03b2f
change-id: 20230809-mmp-nr-clks-7c80e416e6bf

Best regards,
-- 
Duje Mihanović <duje.mihanovic@skole.hr>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] clk: mmp2: Move number of clocks into driver source
  2023-08-09 12:18 [PATCH 0/4] clk: marvell: Move number of clocks into driver source Duje Mihanović
@ 2023-08-09 12:18 ` Duje Mihanović
  2023-08-11  2:17   ` kernel test robot
  2023-08-09 12:18 ` [PATCH 2/4] clk: pxa168: Move number of clocks to " Duje Mihanović
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Duje Mihanović @ 2023-08-09 12:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-clk, linux-kernel, devicetree, Duje Mihanović

The number of clocks should not be in the dt binding as it is not used
by the respective device tree and thus needlessly bloats the ABI.

Move this number of clocks into the driver source.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/clk/mmp/clk-audio.c                    | 4 +++-
 drivers/clk/mmp/clk-of-mmp2.c                  | 4 +++-
 include/dt-bindings/clock/marvell,mmp2-audio.h | 1 -
 include/dt-bindings/clock/marvell,mmp2.h       | 1 -
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/mmp/clk-audio.c b/drivers/clk/mmp/clk-audio.c
index 6fb1aa9487b5..0faa02dcb96a 100644
--- a/drivers/clk/mmp/clk-audio.c
+++ b/drivers/clk/mmp/clk-audio.c
@@ -55,6 +55,8 @@
 #define SSPA_AUD_PLL_CTRL1_DIV_OCLK_PATTERN_MASK (0x7ff << 0)
 #define SSPA_AUD_PLL_CTRL1_DIV_OCLK_PATTERN(x)	((x) << 0)
 
+#define CLK_AUDIO_NR_CLKS			3
+
 struct mmp2_audio_clk {
 	void __iomem *mmio_base;
 
@@ -336,7 +338,7 @@ static int register_clocks(struct mmp2_audio_clk *priv, struct device *dev)
 	priv->clk_data.hws[MMP2_CLK_AUDIO_SYSCLK] = &priv->sysclk_gate.hw;
 	priv->clk_data.hws[MMP2_CLK_AUDIO_SSPA0] = &priv->sspa0_gate.hw;
 	priv->clk_data.hws[MMP2_CLK_AUDIO_SSPA1] = &priv->sspa1_gate.hw;
-	priv->clk_data.num = MMP2_CLK_AUDIO_NR_CLKS;
+	priv->clk_data.num = CLK_AUDIO_NR_CLKS;
 
 	return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
 				      &priv->clk_data);
diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c
index bcf60f43aa13..eaad36ee323d 100644
--- a/drivers/clk/mmp/clk-of-mmp2.c
+++ b/drivers/clk/mmp/clk-of-mmp2.c
@@ -78,6 +78,8 @@
 #define MPMU_PLL_DIFF_CTRL	0x68
 #define MPMU_PLL2_CTRL1		0x414
 
+#define NR_CLKS		200
+
 enum mmp2_clk_model {
 	CLK_MODEL_MMP2,
 	CLK_MODEL_MMP3,
@@ -543,7 +545,7 @@ static void __init mmp2_clk_init(struct device_node *np)
 
 	mmp2_pm_domain_init(np, pxa_unit);
 
-	mmp_clk_init(np, &pxa_unit->unit, MMP2_NR_CLKS);
+	mmp_clk_init(np, &pxa_unit->unit, NR_CLKS);
 
 	mmp2_main_clk_init(pxa_unit);
 
diff --git a/include/dt-bindings/clock/marvell,mmp2-audio.h b/include/dt-bindings/clock/marvell,mmp2-audio.h
index 20664776f497..9653e04dedc3 100644
--- a/include/dt-bindings/clock/marvell,mmp2-audio.h
+++ b/include/dt-bindings/clock/marvell,mmp2-audio.h
@@ -6,5 +6,4 @@
 #define MMP2_CLK_AUDIO_SSPA0		1
 #define MMP2_CLK_AUDIO_SSPA1		2
 
-#define MMP2_CLK_AUDIO_NR_CLKS		3
 #endif
diff --git a/include/dt-bindings/clock/marvell,mmp2.h b/include/dt-bindings/clock/marvell,mmp2.h
index f0819d66b230..88c2d716476f 100644
--- a/include/dt-bindings/clock/marvell,mmp2.h
+++ b/include/dt-bindings/clock/marvell,mmp2.h
@@ -91,5 +91,4 @@
 #define MMP3_CLK_SDH4			126
 #define MMP2_CLK_AUDIO			127
 
-#define MMP2_NR_CLKS			200
 #endif

-- 
2.41.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] clk: pxa168: Move number of clocks to driver source
  2023-08-09 12:18 [PATCH 0/4] clk: marvell: Move number of clocks into driver source Duje Mihanović
  2023-08-09 12:18 ` [PATCH 1/4] clk: mmp2: " Duje Mihanović
@ 2023-08-09 12:18 ` Duje Mihanović
  2023-08-09 12:18 ` [PATCH 3/4] clk: pxa1928: " Duje Mihanović
  2023-08-09 12:18 ` [PATCH 4/4] clk: pxa910: " Duje Mihanović
  3 siblings, 0 replies; 6+ messages in thread
From: Duje Mihanović @ 2023-08-09 12:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-clk, linux-kernel, devicetree, Duje Mihanović

The number of clocks should not be in the dt binding as it is not used
by the respective device tree and thus needlessly bloats the ABI.

Move this number of clocks into the driver source.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/clk/mmp/clk-of-pxa168.c            | 4 +++-
 include/dt-bindings/clock/marvell,pxa168.h | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mmp/clk-of-pxa168.c b/drivers/clk/mmp/clk-of-pxa168.c
index 130d1a723879..fb0df64cf053 100644
--- a/drivers/clk/mmp/clk-of-pxa168.c
+++ b/drivers/clk/mmp/clk-of-pxa168.c
@@ -62,6 +62,8 @@
 #define APMU_EPD	0x104
 #define MPMU_UART_PLL	0x14
 
+#define NR_CLKS		200
+
 struct pxa168_clk_unit {
 	struct mmp_clk_unit unit;
 	void __iomem *mpmu_base;
@@ -321,7 +323,7 @@ static void __init pxa168_clk_init(struct device_node *np)
 		return;
 	}
 
-	mmp_clk_init(np, &pxa_unit->unit, PXA168_NR_CLKS);
+	mmp_clk_init(np, &pxa_unit->unit, NR_CLKS);
 
 	pxa168_pll_init(pxa_unit);
 
diff --git a/include/dt-bindings/clock/marvell,pxa168.h b/include/dt-bindings/clock/marvell,pxa168.h
index c92d969ae941..d1bb59187e1d 100644
--- a/include/dt-bindings/clock/marvell,pxa168.h
+++ b/include/dt-bindings/clock/marvell,pxa168.h
@@ -63,5 +63,4 @@
 #define PXA168_CLK_SDH01_AXI		111
 #define PXA168_CLK_SDH23_AXI		112
 
-#define PXA168_NR_CLKS			200
 #endif

-- 
2.41.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] clk: pxa1928: Move number of clocks to driver source
  2023-08-09 12:18 [PATCH 0/4] clk: marvell: Move number of clocks into driver source Duje Mihanović
  2023-08-09 12:18 ` [PATCH 1/4] clk: mmp2: " Duje Mihanović
  2023-08-09 12:18 ` [PATCH 2/4] clk: pxa168: Move number of clocks to " Duje Mihanović
@ 2023-08-09 12:18 ` Duje Mihanović
  2023-08-09 12:18 ` [PATCH 4/4] clk: pxa910: " Duje Mihanović
  3 siblings, 0 replies; 6+ messages in thread
From: Duje Mihanović @ 2023-08-09 12:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-clk, linux-kernel, devicetree, Duje Mihanović

The number of clocks should not be in the dt binding as it is not used
by the respective device tree and thus needlessly bloats the ABI.

Move this number of clocks into the driver source.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/clk/mmp/clk-of-pxa1928.c            | 7 +++++--
 include/dt-bindings/clock/marvell,pxa1928.h | 3 ---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/mmp/clk-of-pxa1928.c b/drivers/clk/mmp/clk-of-pxa1928.c
index 2508a0d795f8..9def4b5f10e9 100644
--- a/drivers/clk/mmp/clk-of-pxa1928.c
+++ b/drivers/clk/mmp/clk-of-pxa1928.c
@@ -22,6 +22,9 @@
 
 #define MPMU_UART_PLL	0x14
 
+#define APBC_NR_CLKS	48
+#define APMU_NR_CLKS	96
+
 struct pxa1928_clk_unit {
 	struct mmp_clk_unit unit;
 	void __iomem *mpmu_base;
@@ -235,7 +238,7 @@ static void __init pxa1928_apmu_clk_init(struct device_node *np)
 		return;
 	}
 
-	mmp_clk_init(np, &pxa_unit->unit, PXA1928_APMU_NR_CLKS);
+	mmp_clk_init(np, &pxa_unit->unit, APMU_NR_CLKS);
 
 	pxa1928_axi_periph_clk_init(pxa_unit);
 }
@@ -256,7 +259,7 @@ static void __init pxa1928_apbc_clk_init(struct device_node *np)
 		return;
 	}
 
-	mmp_clk_init(np, &pxa_unit->unit, PXA1928_APBC_NR_CLKS);
+	mmp_clk_init(np, &pxa_unit->unit, APBC_NR_CLKS);
 
 	pxa1928_apb_periph_clk_init(pxa_unit);
 	pxa1928_clk_reset_init(np, pxa_unit);
diff --git a/include/dt-bindings/clock/marvell,pxa1928.h b/include/dt-bindings/clock/marvell,pxa1928.h
index 5dca4820297f..0c708d3d3314 100644
--- a/include/dt-bindings/clock/marvell,pxa1928.h
+++ b/include/dt-bindings/clock/marvell,pxa1928.h
@@ -36,7 +36,6 @@
 #define PXA1928_CLK_THSENS_CPU		0x26
 #define PXA1928_CLK_THSENS_VPU		0x27
 #define PXA1928_CLK_THSENS_GC		0x28
-#define PXA1928_APBC_NR_CLKS		0x30
 
 
 /* axi peripherals */
@@ -53,6 +52,4 @@
 #define PXA1928_CLK_GC3D		0x5d
 #define PXA1928_CLK_GC2D		0x5f
 
-#define PXA1928_APMU_NR_CLKS		0x60
-
 #endif

-- 
2.41.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] clk: pxa910: Move number of clocks to driver source
  2023-08-09 12:18 [PATCH 0/4] clk: marvell: Move number of clocks into driver source Duje Mihanović
                   ` (2 preceding siblings ...)
  2023-08-09 12:18 ` [PATCH 3/4] clk: pxa1928: " Duje Mihanović
@ 2023-08-09 12:18 ` Duje Mihanović
  3 siblings, 0 replies; 6+ messages in thread
From: Duje Mihanović @ 2023-08-09 12:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-clk, linux-kernel, devicetree, Duje Mihanović

The number of clocks should not be in the dt binding as it is not used
by the respective device tree and thus needlessly bloats the ABI.

Move this number of clocks into the driver source.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/clk/mmp/clk-of-pxa910.c            | 4 +++-
 include/dt-bindings/clock/marvell,pxa910.h | 1 -
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mmp/clk-of-pxa910.c b/drivers/clk/mmp/clk-of-pxa910.c
index 4d15bac987eb..7a38c424782e 100644
--- a/drivers/clk/mmp/clk-of-pxa910.c
+++ b/drivers/clk/mmp/clk-of-pxa910.c
@@ -44,6 +44,8 @@
 #define APMU_DFC	0x60
 #define MPMU_UART_PLL	0x14
 
+#define NR_CLKS		200
+
 struct pxa910_clk_unit {
 	struct mmp_clk_unit unit;
 	void __iomem *mpmu_base;
@@ -296,7 +298,7 @@ static void __init pxa910_clk_init(struct device_node *np)
 		goto unmap_apbc_region;
 	}
 
-	mmp_clk_init(np, &pxa_unit->unit, PXA910_NR_CLKS);
+	mmp_clk_init(np, &pxa_unit->unit, NR_CLKS);
 
 	pxa910_pll_init(pxa_unit);
 
diff --git a/include/dt-bindings/clock/marvell,pxa910.h b/include/dt-bindings/clock/marvell,pxa910.h
index c9018ab354d0..6caa231de0c1 100644
--- a/include/dt-bindings/clock/marvell,pxa910.h
+++ b/include/dt-bindings/clock/marvell,pxa910.h
@@ -55,5 +55,4 @@
 #define PXA910_CLK_CCIC0_PHY		108
 #define PXA910_CLK_CCIC0_SPHY		109
 
-#define PXA910_NR_CLKS			200
 #endif

-- 
2.41.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] clk: mmp2: Move number of clocks into driver source
  2023-08-09 12:18 ` [PATCH 1/4] clk: mmp2: " Duje Mihanović
@ 2023-08-11  2:17   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2023-08-11  2:17 UTC (permalink / raw)
  To: Duje Mihanović, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: oe-kbuild-all, linux-clk, linux-kernel, devicetree,
	Duje Mihanović

Hi Duje,

kernel test robot noticed the following build errors:

[auto build test ERROR on 52a93d39b17dc7eb98b6aa3edb93943248e03b2f]

url:    https://github.com/intel-lab-lkp/linux/commits/Duje-Mihanovi/clk-mmp2-Move-number-of-clocks-into-driver-source/20230809-202111
base:   52a93d39b17dc7eb98b6aa3edb93943248e03b2f
patch link:    https://lore.kernel.org/r/20230809-mmp-nr-clks-v1-1-5f3cdbbb89b8%40skole.hr
patch subject: [PATCH 1/4] clk: mmp2: Move number of clocks into driver source
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20230811/202308110800.KkX1CemC-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230811/202308110800.KkX1CemC-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308110800.KkX1CemC-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/bits.h:5,
                    from include/linux/bitops.h:6,
                    from include/linux/of.h:15,
                    from include/linux/clk-provider.h:9,
                    from drivers/clk/mmp/clk-audio.c:8:
   drivers/clk/mmp/clk-audio.c: In function 'mmp2_audio_clk_probe':
>> drivers/clk/mmp/clk-audio.c:354:41: error: 'MMP2_CLK_AUDIO_NR_CLKS' undeclared (first use in this function); did you mean 'MMP2_CLK_AUDIO_SYSCLK'?
     354 |                                         MMP2_CLK_AUDIO_NR_CLKS),
         |                                         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/const.h:12:55: note: in definition of macro '__is_constexpr'
      12 |         (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
         |                                                       ^
   drivers/clk/mmp/clk-audio.c:353:29: note: in expansion of macro 'struct_size'
     353 |                             struct_size(priv, clk_data.hws,
         |                             ^~~~~~~~~~~
   drivers/clk/mmp/clk-audio.c:354:41: note: each undeclared identifier is reported only once for each function it appears in
     354 |                                         MMP2_CLK_AUDIO_NR_CLKS),
         |                                         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/const.h:12:55: note: in definition of macro '__is_constexpr'
      12 |         (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
         |                                                       ^
   drivers/clk/mmp/clk-audio.c:353:29: note: in expansion of macro 'struct_size'
     353 |                             struct_size(priv, clk_data.hws,
         |                             ^~~~~~~~~~~
   In file included from include/linux/vmalloc.h:11,
                    from include/asm-generic/io.h:994,
                    from arch/arm/include/asm/io.h:416,
                    from include/linux/io.h:13,
                    from drivers/clk/mmp/clk-audio.c:9:
>> include/linux/overflow.h:276:9: error: first argument to '__builtin_choose_expr' not a constant
     276 |         __builtin_choose_expr(__is_constexpr(count),                    \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:293:32: note: in expansion of macro 'flex_array_size'
     293 |                 sizeof(*(p)) + flex_array_size(p, member, count),       \
         |                                ^~~~~~~~~~~~~~~
   drivers/clk/mmp/clk-audio.c:353:29: note: in expansion of macro 'struct_size'
     353 |                             struct_size(priv, clk_data.hws,
         |                             ^~~~~~~~~~~
>> include/linux/overflow.h:276:9: error: first argument to '__builtin_choose_expr' not a constant
     276 |         __builtin_choose_expr(__is_constexpr(count),                    \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:294:40: note: in expansion of macro 'flex_array_size'
     294 |                 size_add(sizeof(*(p)), flex_array_size(p, member, count)))
         |                                        ^~~~~~~~~~~~~~~
   drivers/clk/mmp/clk-audio.c:353:29: note: in expansion of macro 'struct_size'
     353 |                             struct_size(priv, clk_data.hws,
         |                             ^~~~~~~~~~~
   include/linux/overflow.h:292:9: error: first argument to '__builtin_choose_expr' not a constant
     292 |         __builtin_choose_expr(__is_constexpr(count),                    \
         |         ^~~~~~~~~~~~~~~~~~~~~
   drivers/clk/mmp/clk-audio.c:353:29: note: in expansion of macro 'struct_size'
     353 |                             struct_size(priv, clk_data.hws,
         |                             ^~~~~~~~~~~


vim +354 drivers/clk/mmp/clk-audio.c

725262d29139cc Lubomir Rintel 2020-05-20  346  
725262d29139cc Lubomir Rintel 2020-05-20  347  static int mmp2_audio_clk_probe(struct platform_device *pdev)
725262d29139cc Lubomir Rintel 2020-05-20  348  {
725262d29139cc Lubomir Rintel 2020-05-20  349  	struct mmp2_audio_clk *priv;
725262d29139cc Lubomir Rintel 2020-05-20  350  	int ret;
725262d29139cc Lubomir Rintel 2020-05-20  351  
725262d29139cc Lubomir Rintel 2020-05-20  352  	priv = devm_kzalloc(&pdev->dev,
725262d29139cc Lubomir Rintel 2020-05-20  353  			    struct_size(priv, clk_data.hws,
725262d29139cc Lubomir Rintel 2020-05-20 @354  					MMP2_CLK_AUDIO_NR_CLKS),
725262d29139cc Lubomir Rintel 2020-05-20  355  			    GFP_KERNEL);
725262d29139cc Lubomir Rintel 2020-05-20  356  	if (!priv)
725262d29139cc Lubomir Rintel 2020-05-20  357  		return -ENOMEM;
725262d29139cc Lubomir Rintel 2020-05-20  358  
725262d29139cc Lubomir Rintel 2020-05-20  359  	spin_lock_init(&priv->lock);
725262d29139cc Lubomir Rintel 2020-05-20  360  	platform_set_drvdata(pdev, priv);
725262d29139cc Lubomir Rintel 2020-05-20  361  
725262d29139cc Lubomir Rintel 2020-05-20  362  	priv->mmio_base = devm_platform_ioremap_resource(pdev, 0);
725262d29139cc Lubomir Rintel 2020-05-20  363  	if (IS_ERR(priv->mmio_base))
725262d29139cc Lubomir Rintel 2020-05-20  364  		return PTR_ERR(priv->mmio_base);
725262d29139cc Lubomir Rintel 2020-05-20  365  
725262d29139cc Lubomir Rintel 2020-05-20  366  	pm_runtime_enable(&pdev->dev);
725262d29139cc Lubomir Rintel 2020-05-20  367  	ret = pm_clk_create(&pdev->dev);
725262d29139cc Lubomir Rintel 2020-05-20  368  	if (ret)
725262d29139cc Lubomir Rintel 2020-05-20  369  		goto disable_pm_runtime;
725262d29139cc Lubomir Rintel 2020-05-20  370  
725262d29139cc Lubomir Rintel 2020-05-20  371  	ret = pm_clk_add(&pdev->dev, "audio");
725262d29139cc Lubomir Rintel 2020-05-20  372  	if (ret)
725262d29139cc Lubomir Rintel 2020-05-20  373  		goto destroy_pm_clk;
725262d29139cc Lubomir Rintel 2020-05-20  374  
725262d29139cc Lubomir Rintel 2020-05-20  375  	ret = register_clocks(priv, &pdev->dev);
725262d29139cc Lubomir Rintel 2020-05-20  376  	if (ret)
725262d29139cc Lubomir Rintel 2020-05-20  377  		goto destroy_pm_clk;
725262d29139cc Lubomir Rintel 2020-05-20  378  
725262d29139cc Lubomir Rintel 2020-05-20  379  	return 0;
725262d29139cc Lubomir Rintel 2020-05-20  380  
725262d29139cc Lubomir Rintel 2020-05-20  381  destroy_pm_clk:
725262d29139cc Lubomir Rintel 2020-05-20  382  	pm_clk_destroy(&pdev->dev);
725262d29139cc Lubomir Rintel 2020-05-20  383  disable_pm_runtime:
725262d29139cc Lubomir Rintel 2020-05-20  384  	pm_runtime_disable(&pdev->dev);
725262d29139cc Lubomir Rintel 2020-05-20  385  
725262d29139cc Lubomir Rintel 2020-05-20  386  	return ret;
725262d29139cc Lubomir Rintel 2020-05-20  387  }
725262d29139cc Lubomir Rintel 2020-05-20  388  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-11  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 12:18 [PATCH 0/4] clk: marvell: Move number of clocks into driver source Duje Mihanović
2023-08-09 12:18 ` [PATCH 1/4] clk: mmp2: " Duje Mihanović
2023-08-11  2:17   ` kernel test robot
2023-08-09 12:18 ` [PATCH 2/4] clk: pxa168: Move number of clocks to " Duje Mihanović
2023-08-09 12:18 ` [PATCH 3/4] clk: pxa1928: " Duje Mihanović
2023-08-09 12:18 ` [PATCH 4/4] clk: pxa910: " Duje Mihanović

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).