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-09 11:15:04
Also in: lkml

On Fri, 06 Aug 2021, Mark Brown wrote:
On Fri, Aug 06, 2021 at 12:38:36PM +0100, Lee Jones wrote:
quoted
On Fri, 06 Aug 2021, Alistair Francis wrote:
quoted
quoted
+	i2c_set_clientdata(i2c, regmap);
+
quoted
No need to store this here.
quoted
Just do this in the child device:
quoted
     dev_get_regmap(pdev->dev.parent, NULL);
Note that dev_get_regmap() is relatively expensive compared to a simple
driver data reference since it needs to go search for the device to find
the regmap, it's not the end of the world especially in the context of
doing I2C I/O but storing it isn't a terrible idea.
It would be nice if someone could do some metrics on this.

-- 
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