Message ID | 20210806091058.141-1-alistair@alistair23.me |
---|---|
Headers | show |
Series | Add support for the silergy,sy7636a | expand |
On Fri, 06 Aug 2021, Alistair Francis wrote: > Signed-off-by: Alistair Francis <alistair@alistair23.me> > --- > 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);
On Fri, 06 Aug 2021, Mark Brown wrote: > 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. 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
On Fri, 6 Aug 2021 19:10:46 +1000, Alistair Francis wrote: > This series applied on top of the "mfd: simple-mfd-i2c: Add support for > registering devices via MFD cells" patch. Once "mfd: simple-mfd-i2c: Add > support for registering devices via MFD cells" is merged this series is > ready to go. > > v9: > - Convert to use the simple-mfd-i2c instead > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next Thanks! [05/12] regulator: sy7636a: Use the regmap directly commit: 27fdd3bbb7a13830c05b6bf777e45c392cb00f63 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
On Mon, Aug 9, 2021 at 9:14 PM Lee Jones <lee.jones@linaro.org> wrote: > > On Fri, 06 Aug 2021, Mark Brown wrote: > > > 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. > > It would be nice if someone could do some metrics on this. I updated it to use `dev_get_regmap()` in version 10 of the series Alistair > > -- > Lee Jones [李琼斯] > Senior Technical Lead - Developer Services > Linaro.org │ Open source software for Arm SoCs > Follow Linaro: Facebook | Twitter | Blog