lkml.org 
[lkml]   [2021]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 03/12] mfd: simple-mfd-i2c: Save the register client data
On Fri, Aug 06, 2021 at 12:38:36PM +0100, Lee Jones wrote:
> On Fri, 06 Aug 2021, Alistair Francis wrote:

> > + 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);

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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-08-06 13:47    [W:0.070 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site