Re: [PATCH v2 3/4] dt-bindings: mfd: Add Delta TN48M CPLD drivers bindings

From: Robert Marko
Date: Wed Jun 02 2021 - 05:12:55 EST


On Tue, Jun 1, 2021 at 4:48 PM Lee Jones <lee.jones@xxxxxxxxxx> wrote:
>
> On Tue, 01 Jun 2021, Lee Jones wrote:
>
> > On Tue, 01 Jun 2021, Michael Walle wrote:
> >
> > > Am 2021-06-01 10:19, schrieb Lee Jones:
> > > > Why do you require one single Regmap anyway? Are they register banks
> > > > not neatly separated on a per-function basis?
> > >
> > > AFAIK you can only have one I2C device driver per device, hence the
> > > simple-mfd-i2c.
> >
> > Sorry, can you provide more detail.
>
> I'd still like further explanation to be sure, but if you mean what I
> think you mean then, no, I don't think that's correct.
>
> The point of simple-mfd-i2c is to provide an I2C device offering
> multiple functions, but does so via a non-separated/linear register-
> set, with an entry point and an opportunity to register its interwoven
> bank of registers via Regmap.
>
> However, if you can get away with not registering your entire register
> set as a single Regmap chunk, then all the better. This will allow
> you to use the OF provided 'simple-mfd' compatible instead.
>
> Now, if you're talking about Regmap not supporting multiple
> registrations with only a single I2C address, this *may* very well be
> the case, but IIRC, I've spoken to Mark about this previously and he
> said the extension to make this possible would be trivial.

This is my understanding, that you cannot have multiple regmap registrations
with on the same I2C address.
At least that is how it was the last time I tested.
That is why I went the MFD way.

Regards,
Robert
>
> So we have to take this on a device-by-device basis an decide what is
> best at the time of submission.
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog



--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@xxxxxxxxxx
Web: www.sartura.hr