Thread (21 messages) 21 messages, 4 authors, 2021-08-10

Re: [PATCH v9 03/12] mfd: simple-mfd-i2c: Save the register client data

From: Lee Jones <hidden>
Date: 2021-08-06 11:38:44
Also in: linux-devicetree

On Fri, 06 Aug 2021, Alistair Francis wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Alistair Francis <redacted>
---
 drivers/mfd/simple-mfd-i2c.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
index 583e8c7924af..633a2b28b6cb 100644
--- a/drivers/mfd/simple-mfd-i2c.c
+++ b/drivers/mfd/simple-mfd-i2c.c
@@ -48,6 +48,8 @@ static int simple_mfd_i2c_probe(struct i2c_client *i2c)
 	if (IS_ERR(regmap))
 		return PTR_ERR(regmap);
 
+	i2c_set_clientdata(i2c, regmap);
+
No need to store this here.

Just do this in the child device:

     dev_get_regmap(pdev->dev.parent, NULL);
 	/* If no MFD cells are spedified, use register the DT child nodes instead */
 	if (!simple_mfd_data || !simple_mfd_data->mfd_cell)
 		return devm_of_platform_populate(&i2c->dev);
-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help