[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3iRmXC2jDj92QHKqyD+x_UJ7rWU_KcGt=MFOD9UW38RA@mail.gmail.com>
Date: Thu, 18 Jun 2020 11:29:16 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Lee Jones <lee.jones@...aro.org>
Cc: michael@...le.cc, Rob Herring <robh+dt@...nel.org>,
Mark Brown <broonie@...nel.org>,
gregkh <gregkh@...uxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
DTML <devicetree@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/1] mfd: Add I2C based System Configuaration (SYSCON) access
On Thu, Jun 18, 2020 at 10:03 AM Lee Jones <lee.jones@...aro.org> wrote:
>
> The existing SYSCON implementation only supports MMIO (memory mapped)
> accesses, facilitated by Regmap. This extends support for registers
> held behind I2C busses.
>
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
The implementation looks fine to me, but can you explain how this is going to
be used, and what the advantage is over open-coding the devm_regmap_init_i2c()
in each driver that would use this?
Is this about using proper locking through the regmap framework for
shared i2c clients, or to reduce memory consumption when lots of drivers
access the same regmap?
My impression of the existing syscon code is that the main value-add over
other ways of doing the same is the syscon_regmap_lookup_by_phandle()
interface that gives other drivers a much simpler way of getting the
regmap just based on the DT node. Are you planning to add something
like that here as well? An ideal driver interface might allow
syscon_regmap_lookup_by_phandle() to work for both mmio and i2c
based syscons, or additional ones as well, but implementing this would
be rather tricky when the i2c core is a loadable module.
Arnd
Powered by blists - more mailing lists