[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210306230619.15ae787f@aktux>
Date: Sat, 6 Mar 2021 23:06:19 +0100
From: Andreas Kemnade <andreas@...nade.info>
To: Jonathan Neuschäfer <j.neuschaefer@....net>
Cc: lee.jones@...aro.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH -next] mfd: ntxec: Support for EC in Tolino Shine 2 HD
On Sat, 6 Mar 2021 21:19:38 +0100
Jonathan Neuschäfer <j.neuschaefer@....net> wrote:
[...]
> > > > + case NTXEC_VERSION_TOLINO_SHINE2:
> > > > + has_rtc = false;
> > > > + ec->regmap = devm_regmap_init(ec->dev, NULL,
> > > > + ec->regmap,
> > > > + ®map_config_noack);
> > >
> > > Ah— A custom regmap stacked on top of the old regmap… I think this
> > > deserves a comment.
> > >
> > Yes, devm_regmap_init_i2c() sets a different set of callbacks depending
> > on circumstances. Seems to be the easiest way to avoid duplicating too
> > much code. I really hope that there are not so much devices requiring
> > such a dirty stuff that adding such thing to the generic regmap code
> > would be justified.
>
> Ok, please add a short comment here or extend the one above the repmap
> config struct, to save interested readers a bit of trouble. I guess "add
> a wrapper" goes in right direction, but it didn't make the stacking
> obvious to me when I first read it.
>
I will wait for some days to see whether anybody chokes on that stack.
Regards,
Andreas
Powered by blists - more mailing lists