public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spmi: Fix controller->node != parent->node breakage
@ 2025-01-11 11:21 Konrad Dybcio
  2025-01-12  2:26 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Konrad Dybcio @ 2025-01-11 11:21 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Stephen Boyd, Joe Hattori
  Cc: Marijn Suijten, linux-kernel, Bjorn Andersson, Abel Vesa,
	Johan Hovold, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

On some platforms, like recent Qualcomm SoCs with multi-bus SPMI
arbiters, controller->node must be assigned to the individual buses'
subnodes, as the slave devices are children of these, like so:

arbiter@c400000
	spmi@c42d000
		pmic@0

	spmi@c432000
		pmic@0

The commit referenced in Fixes changed that assignment, such that
spmi_controller_alloc() always assumes the PMICs come directly under
the arbiter node (which is true when there's only a single bus per
controller).

Make controller->node specifiable to both benefit from Joe's refcount
improvements and un-break the aforementioned platforms.

Fixes: 821b07853e32 ("spmi: hisi-spmi-controller: manage the OF node reference in device initialization and cleanup")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/spmi/hisi-spmi-controller.c | 4 +++-
 drivers/spmi/spmi-devres.c          | 6 ++++--
 drivers/spmi/spmi-pmic-arb.c        | 2 +-
 drivers/spmi/spmi.c                 | 4 +++-
 include/linux/spmi.h                | 5 ++++-
 5 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/spmi/hisi-spmi-controller.c b/drivers/spmi/hisi-spmi-controller.c
index dd21c5d1ca8301d508b85dfaf61ddfabed17aca9..7cb056bb5529708d37aeda9f6fa2058d4c7a536a 100644
--- a/drivers/spmi/hisi-spmi-controller.c
+++ b/drivers/spmi/hisi-spmi-controller.c
@@ -267,7 +267,9 @@ static int spmi_controller_probe(struct platform_device *pdev)
 	struct resource *iores;
 	int ret;
 
-	ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*spmi_controller));
+	ctrl = devm_spmi_controller_alloc(&pdev->dev,
+					  pdev->dev.of_node
+					  sizeof(*spmi_controller));
 	if (IS_ERR(ctrl)) {
 		dev_err(&pdev->dev, "can not allocate spmi_controller data\n");
 		return PTR_ERR(ctrl);
diff --git a/drivers/spmi/spmi-devres.c b/drivers/spmi/spmi-devres.c
index 62c4b3f24d0656eea9b6da489b7716b9965bedbe..e84af711714d1892a5781111dc538747f5a5e835 100644
--- a/drivers/spmi/spmi-devres.c
+++ b/drivers/spmi/spmi-devres.c
@@ -11,7 +11,9 @@ static void devm_spmi_controller_release(struct device *parent, void *res)
 	spmi_controller_put(*(struct spmi_controller **)res);
 }
 
-struct spmi_controller *devm_spmi_controller_alloc(struct device *parent, size_t size)
+struct spmi_controller *devm_spmi_controller_alloc(struct device *parent,
+						   struct device_node *node,
+						   size_t size)
 {
 	struct spmi_controller **ptr, *ctrl;
 
@@ -19,7 +21,7 @@ struct spmi_controller *devm_spmi_controller_alloc(struct device *parent, size_t
 	if (!ptr)
 		return ERR_PTR(-ENOMEM);
 
-	ctrl = spmi_controller_alloc(parent, size);
+	ctrl = spmi_controller_alloc(parent, node, size);
 	if (IS_ERR(ctrl)) {
 		devres_free(ptr);
 		return ctrl;
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 73f2f19737f8cec266a051a956ce2123661a714e..226f51d94a70328c6322664d2d05a8b64645674a 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1674,7 +1674,7 @@ static int spmi_pmic_arb_bus_init(struct platform_device *pdev,
 	int index, ret;
 	int irq;
 
-	ctrl = devm_spmi_controller_alloc(dev, sizeof(*bus));
+	ctrl = devm_spmi_controller_alloc(dev, node, sizeof(*bus));
 	if (IS_ERR(ctrl))
 		return PTR_ERR(ctrl);
 
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index 166beb2083a3f801435d8ffd843310582911e3ab..c1a03da55a265c9294f6a16bc285310cebd00726 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -435,6 +435,7 @@ EXPORT_SYMBOL_GPL(spmi_device_alloc);
 /**
  * spmi_controller_alloc() - Allocate a new SPMI controller
  * @parent:	parent device
+ * @node:	device node to associate with the controller (usually parent->of_node)
  * @size:	size of private data
  *
  * Caller is responsible for either calling spmi_controller_add() to add the
@@ -443,6 +444,7 @@ EXPORT_SYMBOL_GPL(spmi_device_alloc);
  * spmi_controller_get_drvdata()
  */
 struct spmi_controller *spmi_controller_alloc(struct device *parent,
+					      struct device_node *node,
 					      size_t size)
 {
 	struct spmi_controller *ctrl;
@@ -459,7 +461,7 @@ struct spmi_controller *spmi_controller_alloc(struct device *parent,
 	ctrl->dev.type = &spmi_ctrl_type;
 	ctrl->dev.bus = &spmi_bus_type;
 	ctrl->dev.parent = parent;
-	device_set_node(&ctrl->dev, of_fwnode_handle(of_node_get(parent->of_node)));
+	device_set_node(&ctrl->dev, of_fwnode_handle(of_node_get(node)));
 	spmi_controller_set_drvdata(ctrl, &ctrl[1]);
 
 	id = ida_alloc(&ctrl_ida, GFP_KERNEL);
diff --git a/include/linux/spmi.h b/include/linux/spmi.h
index 28e8c8bd39441fa6451be3364006fb3b47a47dc9..9de74000911456800237a3244d5e8158fadf8317 100644
--- a/include/linux/spmi.h
+++ b/include/linux/spmi.h
@@ -105,6 +105,7 @@ static inline void spmi_controller_set_drvdata(struct spmi_controller *ctrl,
 }
 
 struct spmi_controller *spmi_controller_alloc(struct device *parent,
+					      struct device_node *node,
 					      size_t size);
 
 /**
@@ -120,7 +121,9 @@ static inline void spmi_controller_put(struct spmi_controller *ctrl)
 int spmi_controller_add(struct spmi_controller *ctrl);
 void spmi_controller_remove(struct spmi_controller *ctrl);
 
-struct spmi_controller *devm_spmi_controller_alloc(struct device *parent, size_t size);
+struct spmi_controller *devm_spmi_controller_alloc(struct device *parent,
+						   struct device_node *node,
+						   size_t size);
 int devm_spmi_controller_add(struct device *parent, struct spmi_controller *ctrl);
 
 /**

---
base-commit: 2b88851f583d3c4e40bcd40cfe1965241ec229dd
change-id: 20250111-topic-spmi_node_breakage-f67322a9c1eb

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


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

* Re: [PATCH] spmi: Fix controller->node != parent->node breakage
  2025-01-11 11:21 [PATCH] spmi: Fix controller->node != parent->node breakage Konrad Dybcio
@ 2025-01-12  2:26 ` kernel test robot
  2025-01-12  3:48 ` kernel test robot
  2025-01-13 19:16 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2025-01-12  2:26 UTC (permalink / raw)
  To: Konrad Dybcio, Mauro Carvalho Chehab, Stephen Boyd, Joe Hattori
  Cc: oe-kbuild-all, linux-media, Marijn Suijten, linux-kernel,
	Bjorn Andersson, Abel Vesa, Johan Hovold, Konrad Dybcio

Hi Konrad,

kernel test robot noticed the following build errors:

[auto build test ERROR on 2b88851f583d3c4e40bcd40cfe1965241ec229dd]

url:    https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/spmi-Fix-controller-node-parent-node-breakage/20250111-192215
base:   2b88851f583d3c4e40bcd40cfe1965241ec229dd
patch link:    https://lore.kernel.org/r/20250111-topic-spmi_node_breakage-v1-1-3f60111a1d19%40oss.qualcomm.com
patch subject: [PATCH] spmi: Fix controller->node != parent->node breakage
config: i386-buildonly-randconfig-001-20250112 (https://download.01.org/0day-ci/archive/20250112/202501121029.AZEll6tS-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250112/202501121029.AZEll6tS-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/202501121029.AZEll6tS-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   drivers/spmi/spmi-mtk-pmif.c: In function 'mtk_spmi_probe':
>> drivers/spmi/spmi-mtk-pmif.c:456:55: warning: passing argument 2 of 'devm_spmi_controller_alloc' makes pointer from integer without a cast [-Wint-conversion]
     456 |         ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*arb));
         |                                                       ^~~~~~~~~~~~
         |                                                       |
         |                                                       unsigned int
   In file included from drivers/spmi/spmi-mtk-pmif.c:11:
   include/linux/spmi.h:125:72: note: expected 'struct device_node *' but argument is of type 'unsigned int'
     125 |                                                    struct device_node *node,
         |                                                    ~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/spmi/spmi-mtk-pmif.c:456:16: error: too few arguments to function 'devm_spmi_controller_alloc'
     456 |         ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*arb));
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/spmi.h:124:25: note: declared here
     124 | struct spmi_controller *devm_spmi_controller_alloc(struct device *parent,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/spmi/hisi-spmi-controller.c: In function 'spmi_controller_probe':
>> drivers/spmi/hisi-spmi-controller.c:271:60: error: expected ')' before 'sizeof'
     271 |                                           pdev->dev.of_node
         |                                                            ^
         |                                                            )
     272 |                                           sizeof(*spmi_controller));
         |                                           ~~~~~~            
   drivers/spmi/hisi-spmi-controller.c:270:42: note: to match this '('
     270 |         ctrl = devm_spmi_controller_alloc(&pdev->dev,
         |                                          ^
>> drivers/spmi/hisi-spmi-controller.c:270:16: error: too few arguments to function 'devm_spmi_controller_alloc'
     270 |         ctrl = devm_spmi_controller_alloc(&pdev->dev,
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/spmi/hisi-spmi-controller.c:13:
   include/linux/spmi.h:124:25: note: declared here
     124 | struct spmi_controller *devm_spmi_controller_alloc(struct device *parent,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/devm_spmi_controller_alloc +456 drivers/spmi/spmi-mtk-pmif.c

504eb71e4717ddf James Lo               2021-12-16  448  
b45b3ccef8c063d James Lo               2021-12-16  449  static int mtk_spmi_probe(struct platform_device *pdev)
b45b3ccef8c063d James Lo               2021-12-16  450  {
b45b3ccef8c063d James Lo               2021-12-16  451  	struct pmif *arb;
b45b3ccef8c063d James Lo               2021-12-16  452  	struct spmi_controller *ctrl;
b45b3ccef8c063d James Lo               2021-12-16  453  	int err, i;
b45b3ccef8c063d James Lo               2021-12-16  454  	u32 chan_offset;
b45b3ccef8c063d James Lo               2021-12-16  455  
ffdfbafdc4f46a9 Fei Shao               2023-12-06 @456  	ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*arb));
ffdfbafdc4f46a9 Fei Shao               2023-12-06  457  	if (IS_ERR(ctrl))
ffdfbafdc4f46a9 Fei Shao               2023-12-06  458  		return PTR_ERR(ctrl);
b45b3ccef8c063d James Lo               2021-12-16  459  
b45b3ccef8c063d James Lo               2021-12-16  460  	arb = spmi_controller_get_drvdata(ctrl);
b45b3ccef8c063d James Lo               2021-12-16  461  	arb->data = device_get_match_data(&pdev->dev);
b45b3ccef8c063d James Lo               2021-12-16  462  	if (!arb->data) {
b45b3ccef8c063d James Lo               2021-12-16  463  		dev_err(&pdev->dev, "Cannot get drv_data\n");
ffdfbafdc4f46a9 Fei Shao               2023-12-06  464  		return -EINVAL;
b45b3ccef8c063d James Lo               2021-12-16  465  	}
b45b3ccef8c063d James Lo               2021-12-16  466  
b45b3ccef8c063d James Lo               2021-12-16  467  	arb->base = devm_platform_ioremap_resource_byname(pdev, "pmif");
ffdfbafdc4f46a9 Fei Shao               2023-12-06  468  	if (IS_ERR(arb->base))
ffdfbafdc4f46a9 Fei Shao               2023-12-06  469  		return PTR_ERR(arb->base);
b45b3ccef8c063d James Lo               2021-12-16  470  
b45b3ccef8c063d James Lo               2021-12-16  471  	arb->spmimst_base = devm_platform_ioremap_resource_byname(pdev, "spmimst");
ffdfbafdc4f46a9 Fei Shao               2023-12-06  472  	if (IS_ERR(arb->spmimst_base))
ffdfbafdc4f46a9 Fei Shao               2023-12-06  473  		return PTR_ERR(arb->spmimst_base);
b45b3ccef8c063d James Lo               2021-12-16  474  
b45b3ccef8c063d James Lo               2021-12-16  475  	arb->nclks = ARRAY_SIZE(pmif_clock_names);
b45b3ccef8c063d James Lo               2021-12-16  476  	for (i = 0; i < arb->nclks; i++)
b45b3ccef8c063d James Lo               2021-12-16  477  		arb->clks[i].id = pmif_clock_names[i];
b45b3ccef8c063d James Lo               2021-12-16  478  
e821d50ab5b956e Yu-Che Cheng           2023-12-06  479  	err = clk_bulk_get(&pdev->dev, arb->nclks, arb->clks);
b45b3ccef8c063d James Lo               2021-12-16  480  	if (err) {
b45b3ccef8c063d James Lo               2021-12-16  481  		dev_err(&pdev->dev, "Failed to get clocks: %d\n", err);
ffdfbafdc4f46a9 Fei Shao               2023-12-06  482  		return err;
b45b3ccef8c063d James Lo               2021-12-16  483  	}
b45b3ccef8c063d James Lo               2021-12-16  484  
b45b3ccef8c063d James Lo               2021-12-16  485  	err = clk_bulk_prepare_enable(arb->nclks, arb->clks);
b45b3ccef8c063d James Lo               2021-12-16  486  	if (err) {
b45b3ccef8c063d James Lo               2021-12-16  487  		dev_err(&pdev->dev, "Failed to enable clocks: %d\n", err);
e821d50ab5b956e Yu-Che Cheng           2023-12-06  488  		goto err_put_clks;
b45b3ccef8c063d James Lo               2021-12-16  489  	}
b45b3ccef8c063d James Lo               2021-12-16  490  
b45b3ccef8c063d James Lo               2021-12-16  491  	ctrl->cmd = pmif_arb_cmd;
b45b3ccef8c063d James Lo               2021-12-16  492  	ctrl->read_cmd = pmif_spmi_read_cmd;
b45b3ccef8c063d James Lo               2021-12-16  493  	ctrl->write_cmd = pmif_spmi_write_cmd;
b45b3ccef8c063d James Lo               2021-12-16  494  
b45b3ccef8c063d James Lo               2021-12-16  495  	chan_offset = PMIF_CHAN_OFFSET * arb->data->soc_chan;
b45b3ccef8c063d James Lo               2021-12-16  496  	arb->chan.ch_sta = PMIF_SWINF_0_STA + chan_offset;
b45b3ccef8c063d James Lo               2021-12-16  497  	arb->chan.wdata = PMIF_SWINF_0_WDATA_31_0 + chan_offset;
b45b3ccef8c063d James Lo               2021-12-16  498  	arb->chan.rdata = PMIF_SWINF_0_RDATA_31_0 + chan_offset;
b45b3ccef8c063d James Lo               2021-12-16  499  	arb->chan.ch_send = PMIF_SWINF_0_ACC + chan_offset;
b45b3ccef8c063d James Lo               2021-12-16  500  	arb->chan.ch_rdy = PMIF_SWINF_0_VLD_CLR + chan_offset;
b45b3ccef8c063d James Lo               2021-12-16  501  
f200fff8d019f27 Nícolas F. R. A. Prado 2023-12-06  502  	raw_spin_lock_init(&arb->lock);
f200fff8d019f27 Nícolas F. R. A. Prado 2023-12-06  503  
b45b3ccef8c063d James Lo               2021-12-16  504  	platform_set_drvdata(pdev, ctrl);
b45b3ccef8c063d James Lo               2021-12-16  505  
b45b3ccef8c063d James Lo               2021-12-16  506  	err = spmi_controller_add(ctrl);
b45b3ccef8c063d James Lo               2021-12-16  507  	if (err)
b45b3ccef8c063d James Lo               2021-12-16  508  		goto err_domain_remove;
b45b3ccef8c063d James Lo               2021-12-16  509  
b45b3ccef8c063d James Lo               2021-12-16  510  	return 0;
b45b3ccef8c063d James Lo               2021-12-16  511  
b45b3ccef8c063d James Lo               2021-12-16  512  err_domain_remove:
b45b3ccef8c063d James Lo               2021-12-16  513  	clk_bulk_disable_unprepare(arb->nclks, arb->clks);
e821d50ab5b956e Yu-Che Cheng           2023-12-06  514  err_put_clks:
e821d50ab5b956e Yu-Che Cheng           2023-12-06  515  	clk_bulk_put(arb->nclks, arb->clks);
b45b3ccef8c063d James Lo               2021-12-16  516  	return err;
b45b3ccef8c063d James Lo               2021-12-16  517  }
b45b3ccef8c063d James Lo               2021-12-16  518  

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

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

* Re: [PATCH] spmi: Fix controller->node != parent->node breakage
  2025-01-11 11:21 [PATCH] spmi: Fix controller->node != parent->node breakage Konrad Dybcio
  2025-01-12  2:26 ` kernel test robot
@ 2025-01-12  3:48 ` kernel test robot
  2025-01-13 19:16 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2025-01-12  3:48 UTC (permalink / raw)
  To: Konrad Dybcio, Mauro Carvalho Chehab, Stephen Boyd, Joe Hattori
  Cc: llvm, oe-kbuild-all, linux-media, Marijn Suijten, linux-kernel,
	Bjorn Andersson, Abel Vesa, Johan Hovold, Konrad Dybcio

Hi Konrad,

kernel test robot noticed the following build errors:

[auto build test ERROR on 2b88851f583d3c4e40bcd40cfe1965241ec229dd]

url:    https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/spmi-Fix-controller-node-parent-node-breakage/20250111-192215
base:   2b88851f583d3c4e40bcd40cfe1965241ec229dd
patch link:    https://lore.kernel.org/r/20250111-topic-spmi_node_breakage-v1-1-3f60111a1d19%40oss.qualcomm.com
patch subject: [PATCH] spmi: Fix controller->node != parent->node breakage
config: hexagon-randconfig-002-20250112 (https://download.01.org/0day-ci/archive/20250112/202501121127.soBkTzgY-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f5cd181ffbb7cb61d582fe130d46580d5969d47a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250112/202501121127.soBkTzgY-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/202501121127.soBkTzgY-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/spmi/hisi-spmi-controller.c:272:8: error: expected ')'
     272 |                                           sizeof(*spmi_controller));
         |                                           ^
   drivers/spmi/hisi-spmi-controller.c:270:35: note: to match this '('
     270 |         ctrl = devm_spmi_controller_alloc(&pdev->dev,
         |                                          ^
   1 error generated.


vim +272 drivers/spmi/hisi-spmi-controller.c

   262	
   263	static int spmi_controller_probe(struct platform_device *pdev)
   264	{
   265		struct spmi_controller_dev *spmi_controller;
   266		struct spmi_controller *ctrl;
   267		struct resource *iores;
   268		int ret;
   269	
   270		ctrl = devm_spmi_controller_alloc(&pdev->dev,
   271						  pdev->dev.of_node
 > 272						  sizeof(*spmi_controller));
   273		if (IS_ERR(ctrl)) {
   274			dev_err(&pdev->dev, "can not allocate spmi_controller data\n");
   275			return PTR_ERR(ctrl);
   276		}
   277		spmi_controller = spmi_controller_get_drvdata(ctrl);
   278		spmi_controller->controller = ctrl;
   279	
   280		iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   281		if (!iores) {
   282			dev_err(&pdev->dev, "can not get resource!\n");
   283			return -EINVAL;
   284		}
   285	
   286		spmi_controller->base = devm_ioremap(&pdev->dev, iores->start,
   287						     resource_size(iores));
   288		if (!spmi_controller->base) {
   289			dev_err(&pdev->dev, "can not remap base addr!\n");
   290			return -EADDRNOTAVAIL;
   291		}
   292	
   293		ret = of_property_read_u32(pdev->dev.of_node, "hisilicon,spmi-channel",
   294					   &spmi_controller->channel);
   295		if (ret) {
   296			dev_err(&pdev->dev, "can not get channel\n");
   297			return -ENODEV;
   298		}
   299	
   300		platform_set_drvdata(pdev, spmi_controller);
   301		dev_set_drvdata(&ctrl->dev, spmi_controller);
   302	
   303		spin_lock_init(&spmi_controller->lock);
   304	
   305		ctrl->dev.parent = pdev->dev.parent;
   306	
   307		/* Callbacks */
   308		ctrl->read_cmd = spmi_read_cmd;
   309		ctrl->write_cmd = spmi_write_cmd;
   310	
   311		ret = devm_spmi_controller_add(&pdev->dev, ctrl);
   312		if (ret) {
   313			dev_err(&pdev->dev, "spmi_controller_add failed with error %d!\n", ret);
   314			return ret;
   315		}
   316	
   317		return 0;
   318	}
   319	

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

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

* Re: [PATCH] spmi: Fix controller->node != parent->node breakage
  2025-01-11 11:21 [PATCH] spmi: Fix controller->node != parent->node breakage Konrad Dybcio
  2025-01-12  2:26 ` kernel test robot
  2025-01-12  3:48 ` kernel test robot
@ 2025-01-13 19:16 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2025-01-13 19:16 UTC (permalink / raw)
  To: Joe Hattori, Konrad Dybcio, Mauro Carvalho Chehab
  Cc: Marijn Suijten, linux-kernel, Bjorn Andersson, Abel Vesa,
	Johan Hovold, Konrad Dybcio

Quoting Konrad Dybcio (2025-01-11 03:21:00)
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> On some platforms, like recent Qualcomm SoCs with multi-bus SPMI
> arbiters, controller->node must be assigned to the individual buses'
> subnodes, as the slave devices are children of these, like so:
> 
> arbiter@c400000
>         spmi@c42d000
>                 pmic@0
> 
>         spmi@c432000
>                 pmic@0
> 
> The commit referenced in Fixes changed that assignment, such that
> spmi_controller_alloc() always assumes the PMICs come directly under
> the arbiter node (which is true when there's only a single bus per
> controller).
> 
> Make controller->node specifiable to both benefit from Joe's refcount
> improvements and un-break the aforementioned platforms.
> 
> Fixes: 821b07853e32 ("spmi: hisi-spmi-controller: manage the OF node reference in device initialization and cleanup")

I'll drop that patch. It sounds like it's not ready.

> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

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

end of thread, other threads:[~2025-01-13 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-11 11:21 [PATCH] spmi: Fix controller->node != parent->node breakage Konrad Dybcio
2025-01-12  2:26 ` kernel test robot
2025-01-12  3:48 ` kernel test robot
2025-01-13 19:16 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox